When handling chrome crash:
call debugd to write kernel task states into syslog,
parse only the relevant task states out of syslog,
pack them into the log file to be uploaded.
BUG=chromium:244916
TEST=Kill chrome, see the task states in crash log, on Link, Snow and Alex.
Change-Id: Ib8aad79622886581ae5ce50c03097f01db9153a7
Reviewed-on: https://gerrit.chromium.org/gerrit/63205
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
i915_error_state was previously truncated by debugd,
and will be compressed in the future to prevent that.
Because of compression, it will now be received in base64 format,
so to reduce it's size, decode it back.
Also, use xz compression, since it's more compact.
The second compression is a preparation for adding task states to the logs.
BUG=chromium:219121
TEST=Kill chrome, see the log gathered. Uploaded report id 5e5a6f9bf6ff4b5f.
Change-Id: I316cdaef8f8f42d4ac839f7c880960cdf6d7a1e8
Reviewed-on: https://gerrit.chromium.org/gerrit/62568
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Remove references to the low-battery state file formerly
written by powerd. The system shuts down immediately when it
enters the low-battery state.
BUG=chromium:259189
TEST=ran unit tests
Change-Id: I2122210b448af58fb4ecac2c234b9faa9d231e2b
Reviewed-on: https://gerrit.chromium.org/gerrit/62578
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Since crash_collector runs as chronos for chrome crashes,
it doesn't have permission to read i915_error_state.
Switch to getting it from debugd instead of reading directly.
Also, collect it for all chrome crashes.
BUG=chromium:219121
TEST=Kill chrome, see the log gathered. Uploaded report id 7cbae7f70da9bd3e.
Change-Id: Ic74abea2fc86b16c5a7f0f11df73137d93e5220c
Reviewed-on: https://gerrit.chromium.org/gerrit/61606
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Adds some logging of parse errors in case there's a format mismatch in future.
Fixes detection of the minidump, was checking the wrong variable.
Modifies crash_sender to properly upload a Chrome dump, including all of the
extra options that get included, and identifies it as a Chrome and not ChromeOS
dump so that it shows up in the right lists server-side.
BUG=chromium:216523
TEST=loaded build of chrome with matching changes, verified about:crash causes
a dump to be created and placed in the right spot, and that it uploads
properly by crash_sender
Change-Id: I8a114ad6798f09f33b78df1680153c0412eabf45
Reviewed-on: https://gerrit.chromium.org/gerrit/59572
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
When computing a hash of a kernel warning message, we include the
trailing newline character. Document this fact, to make it easier
to write separate tools that compute the hash.
BUG=none
TEST=cros_workon_make --board=link --test --reconf crash-reporter
Change-Id: I5d78235db5c8bff7e3639c9d1cd3915d343f471e
Reviewed-on: https://gerrit.chromium.org/gerrit/60797
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
The timestamp in the kernel message can have either "+" or "-"
sign. We want to match both of them.
BUG=chromium:226186
TEST=Make sure the script can capture message starting with
"2013-06-19T20:38:58.663410+00:00 localhost kernel: ["
Change-Id: I93647d4fc8b3d796166d2e959b24364de4bc60c5
Reviewed-on: https://gerrit.chromium.org/gerrit/59297
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
This adds the support that when Pixel touchscreen/trackpad driver
atmel_mxt_ts is misbehaving, e.g. failed to update firmware, failed
to read messages from the chip, trigger crash reporter to send system
logging message for further debugging.
We also follow the policy that, for atmel/cypress logs, we only fetch
the last 30s of the logs.
BUG=chromium:226186
TEST=1. On Pixel, replace the touchscreen firmware file
/opt/google/touch/firmware/162.0_1.1.170.bin
with an empty file with the same name
2. Force touchscreen firmware update
/opt/google/touch/scripts/chromeos-touch-firmware-update.sh -d atmel_mxt_ts -f -n maxtouch-ts.fw
3. After the firmware update fails, check crash report exists at
/var/spool/crash/change__i2c_atmel_mxt_ts.XXX
4. Check that the log contains only 30s of entries with "atmel" keyword.
Change-Id: If46a575491378405e60ad1ccbd39026ae6bf2033
Reviewed-on: https://gerrit.chromium.org/gerrit/48239
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
When invoked from chrome we execute too late to get any of the crashing
process' info as it's already been cleaned up by the kernel. So, require
chrome to pass along the name too
BUG=chromium:216523
TEST=manual invocation of /sbin/crash_reporter, verified supplied name gets
used & it doesn't check /proc for any info
Change-Id: Id74cae3ba93426bd0ac74959741a11baf83c2694
Reviewed-on: https://gerrit.chromium.org/gerrit/58929
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Not sure what has changed, but we're uploading crashes now for test images
when we don't want to. When the channel in /etc/lsb-release is marked as
a test channel (which happens for all test images), exit early.
BUG=chromium:239862
TEST=passed vmtests (logging_CrashSender & logging_UserCrash)
TEST=`cbuildbot {arm,amd64,x86}-generic-full` pass
Change-Id: I4a35aaa34b590c575de639888ed8be68bc9608b6
Reviewed-on: https://gerrit.chromium.org/gerrit/51084
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The recent multiprofile work forgot to append /crash to the user-specific
crash path. It was in the fallback path, but not the dynamic one.
BUG=chromium:248629
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` works
TEST=`cbuildbot x86-generic-full` works
Change-Id: If87848526b0e78f3f76fd412b0f46e37b7022bd6
Reviewed-on: https://gerrit.chromium.org/gerrit/58232
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This fixes a copy-paste error that initialized (twice)
the wrong object.
BUG=chromium:244574
TEST=none
Change-Id: I8ada187483a7b8dbfd8ec19ca284cf08a685844e
Reviewed-on: https://gerrit.chromium.org/gerrit/56845
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Update crash_sender to scan /home/chronos/u-*/crash/ paths since it's
a shell script and there's no easy way to get the right info via shell
commands. We want to scan all paths in case of different ordering.
For crash_collector, update it to use SessionManager's dbus call to
query the active profiles. We select the first one and use that to
process crashes. This should be fine.
We also need to handle the edge case where no user is logged in (yet a
crash occurs with a program running as chronos uid; e.g. the login).
In the past, we just wrote to /home/chronos/user/crash/ even when there
wasn't a user home dir mounted there. With this change, we formalize
(and document) things a bit more by moving to /home/chronos/crash/. We
want this behavior rather than re-using the system path as our tests
specifically verify system vs user crashes.
BUG=chromium:221778
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passes
TEST=logging_UserCrash autotest passes in a vm
CQ-DEPEND=CL:56112
CQ-DEPEND=CL:57067
Change-Id: If9f2ffd0740533537718b2a5e7d215200f5a41d6
Reviewed-on: https://gerrit.chromium.org/gerrit/55600
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
PLOG automatically appends an error message appropriate
for errno, so use it when logging errors after operations
that would set errno meaningfully.
BUG=None
TEST=None
Change-Id: I63549e149bd699469293e5a7f0e48efa9e388162
Reviewed-on: https://gerrit.chromium.org/gerrit/57213
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
The warn_collector_test.c wrapper which calls system() assumes that the
return value of system() is the exit code when it's really a wait status.
That means we'd often get back values like 256 which, when masked with
0377, we get back 0 and so this test would always "pass".
Once we fix that, we see that the script has been failing for all boards
other than link because of hardcoded paths in the setup:
warn_collector: error while loading shared libraries: libmetrics.so:
cannot open shared object file: No such file or directory
Analysis of these vars show that we haven't even been testing the local
compiled binary. Instead, we've been trying to test the one installed
into the $SYSROOT due to the $PATH munging. I cleaned that up as well
as generally tidied up this test script.
Once we fix that, we then see that the collection doesn't work properly
and fails with:
expected 2 lines in warn-test-log, found this:
6c1b181c
This last bug is due to the regex matching less than was expected:
<PRE_WARN>[^ ]+\n if (WarnStart()) { /* yytext is file:line */
But the actual line looks like:
Apr 31 25:25:25 localhost kernel: [117959.231100] WARNING: at /mnt/host/source/src/third_party/kernel/files/drivers/gpu/drm/i915/intel_dp.c:351 intel_dp_check_edp+0x6b/0xb9()
You can see there is a space between the <file> and the <symbol> which
means we pass in to the start function in this (*not* the file:line):
intel_dp_check_edp+0x6b/0xb9()
When the test script runs, it tries to use sed to mung the error message
to get a new file path, but the collector only looks at the func name,
so the calculated hashes continue to match.
We can fix this latter part in two ways: change the test to mung the
func name, or change the lex to pass in the file+func name. I've gone
the latter route as that seems to have been the intention.
BUG=chromium:217382
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passes
Change-Id: I5b3490c56280bb5260198af930b6744cea585c46
Reviewed-on: https://gerrit.chromium.org/gerrit/56305
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
If we pause the process (standard SIGSTOP/SIGCONT), the read() on the
inotify handle gets angry and aborts. This can happen if you ctrl+z
the program, or if you attach to it with strace. This is undesirable,
so ignore EINTR errors from the read().
BUG=None
TEST=ran `./warn_collector --test` and hit ctrl+z then fg
Change-Id: I49e99abb12ace847e88f973817854d8ba95cf689
Reviewed-on: https://gerrit.chromium.org/gerrit/56303
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Chrome will be modified to pass crashes to crash_reporter via a specially
formatted file, a TLV-style designed to be easily parsed, instead of
multipart/form-data. Extra attributes are added into the .meta file.
BUG=chromium:187808
TEST=new unit tests created
Change-Id: I0d65d118e0e348329d14bb4004c8f7bad5a44a97
Reviewed-on: https://gerrit.chromium.org/gerrit/49972
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Before this change, the signature of a warning is computed from
a string such as this one:
/mnt/host/source/src/third_party/kernel/files/drivers/gpu/drm/i915/intel_dp.c:351 intel_dp_check_edp+0x6b/0xb9()
This change removes all text after the first space, i.e. the function name
and IP offset. The latter varies across architectures and can vary across
builds, giving different signatures for the same warning.
BUG=chromium:227080
TEST=manual
Change-Id: Ied65dbd8edd734bd152a9dd35aaa48f1e8f1b9e8
Reviewed-on: https://gerrit.chromium.org/gerrit/49505
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
A flex-based daemon collects kernel warnings by parsing /var/log/messages
as lines are added to it. For every warning the daemon sends a sample
to a sparse UMA histogram using a hash of the warning as the bucket.
Then, if the warning hasn't been seen before, the daemon invokes the
crash collector to upload the warning stack trace.
BUG=chromium:217382
TEST=manually tested (for now), automated test on its way
CQ-DEPEND=Ic8d5773d05d717a275c4a4b5616e0e4c307337b8
CQ-DEPEND=I6a4010acad0ffe20c702bb0fc455e3da7cdf3ac1
Change-Id: I89090e5c2b61ec46b4e740f0895c591728d70e77
Reviewed-on: https://gerrit.chromium.org/gerrit/48277
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Fixes a clang error. Also use "base::FilePath" since FilePath has been
moved to the base namespace.
BUG=chromium-os:39046
TEST=The following command passes:
USE="chrome_internal" CFLAGS="-clang -print-cmdline"
CXXFLAGS="-clang -print-cmdline" emerge-x86-alex crash-reporter
Change-Id: I7da82093c5685b5b556cba971b1e1b14ac0f59c4
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43577
Reviewed-by: Ben Chan <benchan@chromium.org>
This makes it work with clang (supposedly).
BUG=chromium-os:37965
TEST=`cros_run_unit_tests --board=stumpy -p crash-reporter` passes
Change-Id: I598df1be7c8a38e14cde5f5328a3b6e2e1532ea7
Reviewed-on: https://gerrit.chromium.org/gerrit/43377
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This update replaces the current common.mk used in this project with the newest
version. This will allow all of the common.mk based projects to be on the same
version for debugging and enables profiling support.
BUG=chromium-os:37854
TEST=Exectuted the following commands to confirm the build works:
MODE=profiling cros_workon_make --board=link
MODE=profiling cros_workon_make --board=link --test
cros_workon_make --board=link
cros_workon_make --board=link --test
Repeated these with emerge-link, USE=profiling, and
FEATURES=test as need.
For the emerge command with profiling and testing enable, confirmed the
appropriate coverage files were created in /usr/share/profiling/...
Change-Id: I12fcd4a590994223ddc42cf22670db82e94f0e03
Reviewed-on: https://gerrit.chromium.org/gerrit/42777
Tested-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Make the existence of a crashing process's /proc/<PID>/ directory optional
for all of crash_reporter, except for core2md. In particular, have the
kernel pass the UID of the crashing process to crash_reporter in case the
"status" file is unavailable.
BUG=chromium-os:34385
TEST=Ran unittests and autotests
CQ-DEPEND=I6048d3eb84f8188bee6a755eaa010510f5d2459b
Change-Id: I62df52cab44cf1febc7ed3e55b75bcffa0daf524
Reviewed-on: https://gerrit.chromium.org/gerrit/34078
Commit-Queue: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Mike is taking over for Mike.
BUG=None
TEST=None
Change-Id: I031fd82f7015be19f8232ee77b516699b757cd94
Reviewed-on: https://gerrit.chromium.org/gerrit/41532
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
We are having a daemon touch_noise_monitor which periodically dump
touch event logs to /var/log/touch_event.log. Adding this matching
rule to collect the logs.
BUG=chrome-os-partner:17244
TEST=Made fake touch event /var/log/touch_event.log and call
/sbin/crash_reporter --udev=SUBSYSTEM=TouchEvent to generate
crash report.
Change-Id: Ic2eaea021a3eef31f48c92688600171db961c09f
Reviewed-on: https://gerrit.chromium.org/gerrit/41325
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
We are having a daemon touch_noise_monitor which can monitor
raw touch device events and when identifying noise pattern, it
will call crash reporter to upload relevant touch logs. Adding
this matching rule to make this happen.
BUG=chrome-os-partner:16788
TEST=Made fake touch noise happen and check that crash reported
as reportid c34d76e413aa87ee
Change-Id: I2fa9a32d97a3f31f183623bd44cb3eb8f2436878
Reviewed-on: https://gerrit.chromium.org/gerrit/40014
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Add in the i915 error state as a log file in "chrome" crash reports. "chrome"
isn't normally reported through crash_reporter, so this will only kick in where
a developer has explicitly changed a machine to report them as such.
Because the output can be quite large (as we saw with udev crash reports), the
log is compressed before uploading. Although the file attached to the crash
report will have a ".log" extension, it will actually have been gzip'ed.
BUG=chromium-os:36979
TEST=Tested same config with "sleep" command:
crash/reportdetail?reportid=f429dbcaee7494be
Change-Id: I618a4364dcdd751852a69a79452272b7cf5e61f8
Reviewed-on: https://gerrit.chromium.org/gerrit/39271
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
A bunch of "supplied_MediaPipeline" crashes are showing up for product
"Chrome_ChromeOS", so add "MediaPipeline" as a thread name to ignore as a
Chrome crash.
BUG=chrome-os-partner:16165
TEST=Ran unittests
Change-Id: Iadcba53400c63b1e7fe93d7f1e74c8dd5c37ebd9
Reviewed-on: https://gerrit.chromium.org/gerrit/38673
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Add the udev rule that when trackpad driver cyapa detects abnormal
behavior and fired uevent, additional logs from system logs are
collected.
BUG=chromium-os:35169
TEST=Made fake cyapa uevent and checked that logs are generated
in /var/spool/crash
Change-Id: I7ebabd729e6ce362b6f5db12c7cff38ed75c9792
Reviewed-on: https://gerrit.chromium.org/gerrit/37376
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Current all udev collected reports have the same signature and
exec_name. This patch makes that different udev rules generate
reports with different signatures and exec_name so that it is
easier to search a specific kind of udev report on crash server.
BUG=chromium-os:35169
TEST=Tested locally, with a fake udev rule
ACTION=="change", SUBSYSTEM=="i2c", DRIVER=="cyapa", ENV{ERROR}=="1", RUN+="/sbin/crash_reporter --udev=SUBSYSTEM=i2c-cyapa:ACTION=change"
and fake crash_reporter_logs.conf entry
crash_reporter-udev-collection-change--i2c-cyapa:grep -C 20 cyapa /var/log/messages
Generate a report log with meta data:
"
sig=crash_reporter-udev-collection-change--i2c-cyapa
exec_name=udev-i2c-cyapa
ver=3120.0.2012_10_31_1248
payload=/var/spool/crash/change__i2c_cyapa.20121102.125731.0.log.gz
payload_size=6557
done=1
"
Change-Id: I9f7905b69e786a2a13cb8a8df46eeba243157009
Reviewed-on: https://gerrit.chromium.org/gerrit/37262
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Udev collector compresses crash log and appends .gz as file extension
which is not recognized by crash sender. This patch fixes crash sender
by extracting real file extension if the original log file ends with
.gz.
BUG=chromium-os:35968
TEST=Manually test, crash sender can send udev collector generated
log file: report id 7fa1184e8e62946f.
Change-Id: Ic0abd9f264ef601399cc5edd27faa6f64cd9f204
Reviewed-on: https://gerrit.chromium.org/gerrit/37136
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
For crash reports sent when a machine is in developer mode, annotate them
with a "boot_mode" key set to "dev". This is so other people know the
system may have been mucked with.
BUG=chromium-os:33947
TEST=Ran logging_CrashSender autotest
Change-Id: I30d58885e41f2c32e32b7b0f691ed2e5d14f2e3c
Reviewed-on: https://gerrit.chromium.org/gerrit/33246
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Seeing as kernel crashes no longer include dmesg output, we probably
shouldn't either. This is for crash reports with signature
"crash_reporter-user-collection".
BUG=chromium-os:34389
TEST=Ran logging_UserCrash autotest
CQ-DEPEND=I813a711c3557227cc17a58be8f960bfe569722bc
Change-Id: I52debf6d8ad32132d3b64c7f313f306b26287dd1
Reviewed-on: https://gerrit.chromium.org/gerrit/33167
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
I somehow missed "AudioOutputDevice" as the name of a Chrome thread. It
showed up in crash reports.
BUG=chrome-os-partner:12045
TEST=Ran unittests
Change-Id: Ia29404aebfe806a81fceb6b45145434af6749822
Reviewed-on: https://gerrit.chromium.org/gerrit/33224
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
For crash reports sent from developer images, annotate them with an
"image_type" key set to "dev". This is so other people know they can be
ignored. The key will be set to "force-official" if the $FORCE_OFFICIAL
environment variable is set for non-developer images.
BUG=chromium-os:33947
TEST=Ran logging_CrashSender autotest
Change-Id: I9d87bdc7dac1a9fd4898fb3c7fd1c965c81d4ce3
Reviewed-on: https://gerrit.chromium.org/gerrit/32480
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
At some point Chrome started naming its threads such that crashes report a
different executable name. We've been getting a *lot* of crash-reporter
errors with names like "supplied_Compositor" in particular, so consider
those to be Chrome crashes that should be ignored.
Unfortunately, the thread names can be arbitrary. With this CL we check the
entire range of possible names. Maybe someday someone can use the core file
to determine that a process was originally named "chrome".
BUG=chrome-os-partner:12045
TEST=Ran unittests
Change-Id: Ia82d619bd1ee4367129640dc6c7be5ce258a68bb
Reviewed-on: https://gerrit.chromium.org/gerrit/31084
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
The current build logic assumes the build dir is directly under the
source dir. This fails if the build and source trees are completely
different paths. So use a full path to the source dir rather than a
relative one so that it works in all states.
BUG=chromium-os:33327
TEST=`cros_run_unit_tests --board x86-alex -p crash-reporter` still works
Change-Id: I0e6b4c257cbef5879cb67e8692e3082bbb5fb2d5
Reviewed-on: https://gerrit.chromium.org/gerrit/29577
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Previously added a udev collector to CrashCollector. Now it's time to
put it in its own class.
BUG=chromium-os:30268
TEST=See "TEST=" under https://gerrit.chromium.org/gerrit/21498
Change-Id: I6a62826cb84ef7ccd42a512b00e127af6de3280d
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25112
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
SendEnumToUMA() and SendCrashToUMA() are being called from three
functions in crash_reporter.cc. This patch puts the three calls
plus a repeated TODO into one helper function that's called by the
three existing functions.
BUG=chromium-os:11163,chromium-os:30268
TEST=emerge crash-reporter
Change-Id: I703d93e3a072faa0264a220a69df2203af100c57
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26291
Reviewed-by: Ben Chan <benchan@chromium.org>
BUG=chrome-os-partner:6492
TEST=Run:
"crash_reporter --udev=ACTION=change:KERNEL=card0:SUBSYSTEM=drm"
Check that a card0-drm log.gz file has been created under /var/spool/crash
Check that the corresponding .meta file points to the log.gz file.
Change-Id: Id1ecc82b9fac118f8bf1e5edc40c3a2f61abd4c4
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/21495
Reviewed-by: Ben Chan <benchan@chromium.org>
The KernelCollectorTest.CollectBadDirectory unittest was first re-enabled by
sergiu@ in https://gerrit.chromium.org/gerrit/5433, but it broke the
buildbots and had to be re-disabled. So I'm trying again, but this time I
have the power of trybots! I also added code to output the log if it fails
again.
BUG=chromium-os:18622
TEST=Ran unittests. Ran trybots on: alex-paladin, amd64-generic-paladin,
arm-tegra2-paladin, lumpy-paladin, stumpy-paladin.
Change-Id: Ib7fa1c1a32e9c198db9bdae8f933c9dd9fc3381a
Reviewed-on: https://gerrit.chromium.org/gerrit/20667
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Rather than disable the "format not a string literal, argument types not
checked" warning for the entire kernel_collector.cc file, only disable it
for the code in question.
BUG=chromium-os:27127
TEST=Ran unittests
Change-Id: Id85e7945779cd5d1b6a3b68cfdedae53b3f22c74
Reviewed-on: https://gerrit.chromium.org/gerrit/20484
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
This will allow running of unittests on ARM, as well as cleaning up the make
output some.
BUG=chromium-os:27127
TEST=Ran unittests, logging_CrashSender, and logging_UserCrash
Change-Id: Ide09a42132be0843146dde6687e4424352b6b866
Reviewed-on: https://gerrit.chromium.org/gerrit/20174
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
The CantDisable test was failing because it couldn't properly fake the
enabling of the crash collector -- which meant that the disable didn't
actually fail. The reason was that the "test" directory was being removed
during SetUp(). I also added/improved some error-checking that helped me
track down various unittest failures.
BUG=chromium-os:29395
TEST=Ran unittests
Change-Id: I8cf50dbd0d5187b0028c8cf16ae10a4f68bb160f
Reviewed-on: https://gerrit.chromium.org/gerrit/20129
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
This allows crash_reporter to handle nonfatal errors from the kernel
passed thru udev events. There is a udev .rules file for invoking crash
reporter. Currently it supports DRM error info logging.
BUG=chrome-os-partner:6492
TEST=Run:
"crash_reporter --udev=ACTION=change:KERNEL=card0:SUBSYSTEM=drm"
Check that a card0-drm log file has been created under /var/spool/crash
Change-Id: I05a1d508e5446988575b0c1924878b8e36ae46bb
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/10618