Albert Chaulk [Thu, 2 May 2013 22:38:31 +0000 (15:38 -0700)]
Handle Chrome crashes
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>
Luigi Semenzato [Mon, 29 Apr 2013 19:38:36 +0000 (12:38 -0700)]
Hash only warning "file:line" in warning collector.
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>
Luigi Semenzato [Fri, 12 Apr 2013 00:22:13 +0000 (17:22 -0700)]
Collect and report kernel warnings.
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>
Simon Que [Wed, 20 Feb 2013 01:19:52 +0000 (17:19 -0800)]
Replace FilePath declaration with file_path.h include
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>
Mike Frysinger [Fri, 15 Feb 2013 03:39:57 +0000 (22:39 -0500)]
update to libchrome 180609
Purely mechanical changes here.
BUG=chromium-os:38933
TEST=`cros_run_unit_tests --board=stumpy -p crash-reporter` passes
CQ-DEPEND=CL:43376
Change-Id: I62d5d12556517bedf48d36ada4c651ff1c671fe9
Reviewed-on: https://gerrit.chromium.org/gerrit/43378
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Mike Frysinger [Sat, 19 Jan 2013 16:03:37 +0000 (11:03 -0500)]
use volatile markings in crash test
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>
Ryan Harrison [Wed, 6 Feb 2013 21:33:15 +0000 (16:33 -0500)]
crash-reporter: Updating common.mk to ToT to enable profiling
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>
Michael Krebs [Wed, 26 Sep 2012 01:03:13 +0000 (18:03 -0700)]
crash-reporter: Remove some dependency on /proc
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 Frysinger [Thu, 17 Jan 2013 15:57:06 +0000 (10:57 -0500)]
update OWNERS
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>
Yufeng Shen [Wed, 16 Jan 2013 18:31:43 +0000 (10:31 -0800)]
Revert "crash_sender: Temporary hack to increase MAX_CRASH_RATE to 100 for Link"
This reverts commit
fc5783575be6a6c1c56895ebe99440058ff67fe9
Change-Id: I9034f9b46e20603274d6a7e199665eb0e3dae3fb
Reviewed-on: https://gerrit.chromium.org/gerrit/41363
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Yufeng Shen [Wed, 16 Jan 2013 00:55:09 +0000 (19:55 -0500)]
crash-reporter: Add rule to collect touch event log
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>
Yufeng Shen [Tue, 15 Jan 2013 22:01:36 +0000 (17:01 -0500)]
crash_sender: Temporary hack to increase MAX_CRASH_RATE to 100 for Link
BUG=chrome-os-partner:17244
TEST=On Link
1) Run crash_sender, see log
2013-01-15T16:10:12.774799-08:00 localhost crash_sender[6163]: MAX_CRASH_RATE set to 100
2) mv /etc/session_manager_use_flags.txt /etc/session_manager_use_flags.txt.bak
Run crash_sender
check log
2013-01-15T16:12:35.718920-08:00 localhost crash_sender[6730]: MAX_CRASH_RATE set to 32
Change-Id: Ib0311be802993206b1a7d55b62399d5c935a656d
Reviewed-on: https://gerrit.chromium.org/gerrit/41305
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Yufeng Shen [Thu, 20 Dec 2012 17:19:55 +0000 (12:19 -0500)]
crash-reporter: Add rule to collect touch noise logs
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>
Michael Krebs [Wed, 5 Dec 2012 23:13:08 +0000 (15:13 -0800)]
crash-reporter: Collect i915 error state for chrome crashes
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>
Michael Krebs [Mon, 26 Nov 2012 22:26:17 +0000 (14:26 -0800)]
crash-reporter: Add a new Chrome thread to ignore
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>
Yufeng Shen [Mon, 5 Nov 2012 22:06:34 +0000 (17:06 -0500)]
crash-reporter: Add udev rule to collect cyapa trackpad logs
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>
Yufeng Shen [Fri, 2 Nov 2012 18:21:21 +0000 (14:21 -0400)]
Construct signature and exec_name from udev rules
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>
Yufeng Shen [Thu, 1 Nov 2012 21:25:41 +0000 (17:25 -0400)]
Get the real extension if log file is gzipped
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>
Michael Krebs [Thu, 13 Sep 2012 23:23:11 +0000 (16:23 -0700)]
crash-reporter: Add "boot_mode" key to crash reports for dev mode
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>
Michael Krebs [Thu, 13 Sep 2012 03:31:20 +0000 (20:31 -0700)]
crash-reporter: Don't send dmesg output with internal crash_reporter reports
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>
Michael Krebs [Thu, 13 Sep 2012 20:24:12 +0000 (13:24 -0700)]
crash-reporter: Add a missing Chrome thread to ignore
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>
Michael Krebs [Fri, 7 Sep 2012 02:58:18 +0000 (19:58 -0700)]
crash-reporter: Add "image_type" key to crash reports for dev builds
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>
Michael Krebs [Wed, 22 Aug 2012 03:17:03 +0000 (20:17 -0700)]
crash-reporter: Also ignore renamed Chrome threads
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>
Mike Frysinger [Wed, 8 Aug 2012 03:25:10 +0000 (23:25 -0400)]
fix -I flag paths when building out-of-tree
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>
Simon Que [Sat, 5 May 2012 01:10:09 +0000 (18:10 -0700)]
Create separate udev collector class
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>
Yunlian Jiang [Wed, 27 Jun 2012 17:54:41 +0000 (10:54 -0700)]
crash-reporter: change kDumpFormat to make it compile with gcc 4.7
BUG=None
TEST=compile passed
Change-Id: I9de18a4c91048881717731a88b265a09bfb22060
Reviewed-on: https://gerrit.chromium.org/gerrit/21687
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Simon Que [Thu, 28 Jun 2012 00:28:14 +0000 (17:28 -0700)]
Put send metrics code into common function
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>
Simon Que [Mon, 30 Apr 2012 22:41:10 +0000 (15:41 -0700)]
crash collector: compress udev crash logs
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>
Sergiu Iordache [Fri, 5 Aug 2011 22:32:15 +0000 (15:32 -0700)]
crash-reporter: Re-enable CollectBadDirectory unittest
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>
Michael Krebs [Wed, 18 Apr 2012 19:34:13 +0000 (12:34 -0700)]
crash-reporter: Move disabling of GCC warning into source file
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>
Michael Krebs [Thu, 12 Apr 2012 23:20:51 +0000 (16:20 -0700)]
crash-reporter: Convert Makefile over to using common.mk
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>
Michael Krebs [Thu, 12 Apr 2012 22:24:22 +0000 (15:24 -0700)]
crash-reporter: Fix unclean_shutdown_collector_test to work by itself
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>
Mike Frysinger [Wed, 11 Apr 2012 18:47:09 +0000 (14:47 -0400)]
update to newer libbase
BUG=chromium-os:25872
TEST=`emerge-x86-alex crash-reporter` works
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passed
Change-Id: Iff428b1364f96533d2d2290272823c2c84c48933
Reviewed-on: https://gerrit.chromium.org/gerrit/20008
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Simon Que [Tue, 10 Apr 2012 02:07:07 +0000 (19:07 -0700)]
Add udev event-based crash reporting
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
Michael Krebs [Thu, 5 Apr 2012 03:14:11 +0000 (20:14 -0700)]
crash-reporter: Send "error_type" field for crash-reporter errors
If the "error_type" field was set by crash_reporter (see benchan@'s
https://gerrit.chromium.org/gerrit/17166), then send it with the crash
report. This currently only affects crashes with the
"crash_reporter-user-collection" error signature.
BUG=chromium-os:7871
TEST=Manually ran crash_sender
Change-Id: I34c5e055efb407d57a3f83b07e8d4fc0a6b8fac1
Reviewed-on: https://gerrit.chromium.org/gerrit/19641
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Elly Jones [Fri, 6 Apr 2012 18:18:15 +0000 (14:18 -0400)]
[crash-reporter] add OWNERS
TEST=None
BUG=chromium-os:22007
Change-Id: I96e3743c5428ecb4fe628dfad1862659ddbd9570
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19763
Reviewed-by: Ben Chan <benchan@chromium.org>
Bryan Freed [Tue, 3 Apr 2012 00:05:48 +0000 (17:05 -0700)]
Better support 64bit x86 kernel crashes.
FindCrashingFunction() fails to find the crashing kernel function because
the x86 64bit kernel code (arch/x86/kernel/dumpstack.c:die()) issues "RIP"
instead of "EIP". So it falls back to using the panic string in the crash
signature.
This causes the logging_KernelCrash.py test to fail because it looks for the
crashing function in the signature string.
BUG=chromium-os:22353
TEST=logging_KernelCrash
Change-Id: Ic4790648facf5f0be2b82001f8e18b606eca16c7
Reviewed-on: https://gerrit.chromium.org/gerrit/19492
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Bryan Freed <bfreed@chromium.org>
Commit-Ready: Bryan Freed <bfreed@chromium.org>
Ben Chan [Wed, 14 Mar 2012 23:51:01 +0000 (16:51 -0700)]
Update crash_reporter_logs.conf to collect log files for cros-installer.
BUG=chromium-os:27821
TEST=emerge crash-reporter and verified the updated crash_reporter_logs.conf is installed.
Change-Id: Id2b7de30b36eaa57e6251261d8bca6810d5e8b82
Reviewed-on: https://gerrit.chromium.org/gerrit/18181
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Mike Frysinger [Fri, 9 Mar 2012 19:06:24 +0000 (14:06 -0500)]
clean up makefile and convert to SLOT-ed libbase
This includes a couple of fixes:
- use the right compiler flag names
- execute pkg-config twice total, and not once per compile
- build against SLOT-ed libbase
BUG=chromium-os:16623
TEST=`emerge-x86-alex crash-reporter` still works
TEST=`cros_run_unit_tests --board x86-alex -p crash-reporter` passes
Change-Id: I76fdf552de1c0e10367475f3ad22b6b0b33bfa66
Reviewed-on: https://gerrit.chromium.org/gerrit/17709
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Ben Chan [Wed, 29 Feb 2012 20:10:44 +0000 (12:10 -0800)]
Improve error diagnostics in UserCollector.
This CL makes the following changes to improve error diagnostics in
UserCollector:
1. Add an error type to describe why the crash reporter fails to
collects a user crash, which is reported to the crash server along
with the "crash_reporter-user-collection" error signature.
2. Perform some preliminary validations of the core file before
converting it to a minidump file using core2md.
3. Identify the case when a 32-bit core file is produced on a 64-bit
platform as core2md currently cannot handle 32-bit core files on
a 64-bit platform.
BUG=chromium-os:7871
TEST=Tested the following:
1. emerge-{x86,amd64,arm}-generic crash-reporter
2. FEATURES="test" emerge-{x86,amd64,arm}-generic crash-reporter
3. Run the following autotest tests on x86-mario and stumpy64:
- logging_CrashSender
- logging_UserCrash
Change-Id: Ib50b4cc81a91f7cd75f9440005200d4027ce1f6f
Reviewed-on: https://gerrit.chromium.org/gerrit/17166
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Ben Chan [Thu, 1 Mar 2012 06:26:54 +0000 (22:26 -0800)]
Fix KernelCollector code and unit tests.
This CL fixes the KernelCollectorTest.LoadPreservedDump test due to
KernelCollector::records_ not being initialized. It also updates
KernelCollectorTest.CollectPreservedFileMissing and
KernelCollectorTest.CollectNoCrash.
BUG=chromium-os:27126
TEST=Tested the following:
1. emerge-{x86,amd64,arm}-generic crash-reporter
2. FEATURES="test" emerge-{x86,amd64,arm}-generic crash-reporter
Change-Id: If5a773fa77a2e66e539d204410140d1b4e66d062
Reviewed-on: https://gerrit.chromium.org/gerrit/17125
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Kees Cook [Thu, 23 Feb 2012 01:15:15 +0000 (17:15 -0800)]
Remove collected crash report from pstore
Make sure that once collected, a crash report is removed from the pstore
filesystem so that the memory is cleared to avoid endless crash
duplicates.
BUG=chromium-os:26496
TEST=lumpy build & boot, triggered crashes ("echo bug > /proc/breakme") are
saved to /var/spool/crash and removed from pstore.
STATUS=Fixed
Change-Id: Ic224f5880cdc34d1f75470ac71f27fcad146ff4b
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/16501
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Chris Masone [Fri, 24 Feb 2012 22:38:57 +0000 (14:38 -0800)]
[crash-reporter] Move flag files to /var/run from /tmp
The kernel-crash-detected and unclean-shutdown-detected flag files
needed to move out of /tmp to protect against symlink attacks by
a non-root user. /var/run is owned by root, so non-privileged
users can't write there.
BUG=chromium-os:17085
TEST=unit
TEST=logging_CrashSender,logging_UserCrash
STATUS=Fixed
Change-Id: Ibf9b314f1a03ee984eea2acf6007c120aa300dd1
Reviewed-on: https://gerrit.chromium.org/gerrit/16751
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Mike Frysinger [Mon, 6 Feb 2012 21:47:56 +0000 (16:47 -0500)]
[crash-reporter] drop unused crontab fragment
The ebuild no longer installs this, so punt it.
BUG=chromium-os:25750
TEST=`emerge crash-reporter` still works
Change-Id: I94416b44ee87cc282a80128f5a3b2f190a191184
Reviewed-on: https://gerrit.chromium.org/gerrit/15402
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Elly Jones [Wed, 11 Jan 2012 20:33:28 +0000 (15:33 -0500)]
[crash-reporter] use libchromeos.pc
BUG=chromium-os:24959
TEST=build
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13997
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit
6f7fb4aea569bb597c94194be1ad611b37ffcf40)
Change-Id: I75ea31a75d2e67facc2a38a9aabda2ae81b702a6
Reviewed-on: https://gerrit.chromium.org/gerrit/14406
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
Scott James Remnant [Fri, 13 Jan 2012 01:59:03 +0000 (17:59 -0800)]
Revert "[crash-reporter] use libchromeos.pc"
This reverts commit
490634ffaefa3b3b93c623e376674ab5cd3763c8
Change-Id: I593c57ccd527d1294439ec730c3b805862fefd70
Reviewed-on: https://gerrit.chromium.org/gerrit/14122
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
Elly Jones [Wed, 11 Jan 2012 20:33:28 +0000 (15:33 -0500)]
[crash-reporter] use libchromeos.pc
BUG=chromium-os:24959
TEST=build
Change-Id: I62d6e1f19b429c59f07a06372412b360713a16ef
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13997
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Ben Chan [Mon, 9 Jan 2012 18:29:58 +0000 (10:29 -0800)]
crash-reporter: Read core from stdin even if proc files are unsuable.
This CL fixes commit
c7c7914f49fbdef0d1f06c13854daabe176621ed such that
UserCollector continues to read the core file from stdin even if the proc
files are unusable.
BUG=chromium-os:24820
TEST=Tested the following:
1. Build crash-reporter and run unit tests.
2. Run the following autotest tests on a Cr48:
- logging_CrashSender
- logging_UserCrash
Change-Id: I04d09b15a80344b47f0512196c40e94384c5c323
Reviewed-on: https://gerrit.chromium.org/gerrit/13872
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Ben Chan [Fri, 6 Jan 2012 16:22:07 +0000 (08:22 -0800)]
crash-reporter: Validate proc files and log the state of crashed process.
This CL makes the following changes to UserCollector:
1. Check if the maps file is empty after copying proc files to the
temporary container directory, which prevents the core-to-minidump
conversion failure due to unusable maps file.
2. Obtain and log the state of the crashed process, which helps
determine if the crashed process is in the zombie state.
3. Refactor the status file processing code.
BUG=chromium-os:24820
TEST=Tested the following:
1. Build crash-reporter and run unit tests.
2. Run the following autotest tests on a Cr48:
- logging_CrashSender
- logging_UserCrash
3. Check that the process state of a crashed process is logged in
/var/log/messages.
Change-Id: Iebaf9c36c18185c703c18e7028ee4673dd9ebc93
Reviewed-on: https://gerrit.chromium.org/gerrit/13826
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Luigi Semenzato [Thu, 29 Dec 2011 21:18:35 +0000 (13:18 -0800)]
Use hung thread stack for watchdog panics.
With this change the crash reporter tries to determine if the last stack
dump in the log file is from the hung thread watchdog, and in that case
creates a crash signature that's based on the previous stack dump.
When the previous stack is used because the watchdog function was detected,
prepend "(HANG)" to the function name or kernel message in the signature.
Also use an earlier stack signature if all functions in the last one are
uncertain. This happens in many cases (about 1/2). It's likely a
bug in the kernel but until we fix it this workaround will be helpful.
I tested this manually with the --generate_kernel_signature flag and
with the provided unit test. I also added two unit tests for the two
new cases. Finally, I tried to run the KernelCrashServer autotests,
but it doesn't run correctly in developer mode, even before my change.
BUG=chromium-os:24632
TEST=manually tested, unit tested, and autotested. No further tests required.
Change-Id: Ib65177b06c207675cb7f6e33f1df8fa79dde6090
Reviewed-on: https://gerrit.chromium.org/gerrit/13541
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Ben Chan [Thu, 5 Jan 2012 04:40:15 +0000 (20:40 -0800)]
crash-reporter: Change layout for the container directory of procfs files.
This CL modifies UserCollector to copy procfs files of a crashed process
into /tmp/crash_reporter/<pid> instead of /tmp/crash_reporter.<pid>.
The new directory layout makes it easier for autotest to archive
leftover files under /tmp/crash_reporter due to core2md failures.
BUG=chromium-os:24646
TEST=Tested the following:
1. Build crash-reporter and run unit tests.
2. Run the following autotest tests on a Cr48:
- logging_CrashSender
- logging_UserCrash
Change-Id: I435374eabc1574216881318ddacdfa9d1648c875
Reviewed-on: https://gerrit.chromium.org/gerrit/13697
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Ken Mixter [Tue, 25 Oct 2011 02:15:05 +0000 (02:15 +0000)]
crash-reporter: always write kernel crashes for dev builds
Added check for devloper build. Always write kernel crash files when
running devloper builds.
BUG=None
TEST=run "echo bug > /proc/breakme" and ensure the kcrash files get
created under /var/spool/crash
Change-Id: Iced35df9db1f997c41138f082ee50a3506a88eb2
Reviewed-on: https://gerrit.chromium.org/gerrit/10615
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
Kees Cook [Fri, 4 Nov 2011 20:49:09 +0000 (20:49 +0000)]
Switch away from /dev/mem to new ramoops pstore interface
Use the new ramoops pstore interface instead of reading /dev/mem or
needing to know anything about the ramoops memory configurations.
BUG=chromium-os:12059
TEST=x86-alex build and boot, logging_KernelCrashServer passes,
local "make tests" passes.
Change-Id: Ie713d4f93df7f666537c7181b1b438d7b85d4861
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11245
Reviewed-by: Will Drewry <wad@chromium.org>
Michael Krebs [Tue, 27 Sep 2011 03:04:04 +0000 (20:04 -0700)]
Revert "crash-reporter: Activate updated BadDirectory test"
This reverts commit
4a029228b93edcd9cf79c2578acd27eb56be5bce
Although this passes in my local checkout, it broke the buildbots. Will investigate more.
Change-Id: Ib6e33bb916b43b1a42f8f8e4c0c69eb360c3181c
Reviewed-on: http://gerrit.chromium.org/gerrit/8332
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Sergiu Iordache [Fri, 5 Aug 2011 22:32:15 +0000 (15:32 -0700)]
crash-reporter: Activate updated BadDirectory test
Activated the BadDirectory test which was breaking the build.
BUG=chromium-os:18622
TEST=Ran the unit tests locally and it succeded.
Change-Id: I439d9fb40ec37261ef839c82817d6bc67e683c7d
Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5433
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Mike Frysinger [Wed, 21 Sep 2011 16:41:29 +0000 (12:41 -0400)]
touch up 64bit build cleanliness
Some of the types being used happened to work on 32bit systems because
size_t is pretty much an unsigned int. But with a 64bit system, we see:
kernel_collector.cc: In member function
'virtual bool KernelCollector::LoadParameters()':
kernel_collector.cc:141: error: cannot convert 'size_t*' to 'unsigned int*'
for argument '2' to 'bool LoadValue(FilePath, unsigned int*)'
This is easy to fix by using the correct type in LoadValue().
Next up, we get a failure due to the assumption that int64 can be
displayed using the lld format string. But on 64bit systems, this
doesn't work:
crash_collector.cc: In member function
'void CrashCollector::WriteCrashMetaData(const FilePath&, const std::string&, const std::string&)':
crash_collector.cc:355: error:
format '%lld' expects type 'long long int', but argument 6 has type 'int64'
This takes a little bit more magic to make work. Since printf itself
does not provide a printf string to handle "64bit" types, use the macros
that POSIX provides in inttypes.h. The printf string is a little uglier,
but now should work for all targets.
BUG=chromium-os:20636
TEST=`emerge-amd64-generic crash-reporter` now works
TEST=`emerge-x86-generic crash-reporter` still works
TEST=build+booting x86-alex still works
Change-Id: I8401f2ad932223085dfbe54541590e9b65297783
Reviewed-on: http://gerrit.chromium.org/gerrit/8051
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Katie Roberts-Hoffman [Tue, 20 Sep 2011 16:53:02 +0000 (09:53 -0700)]
Add HWID information for ARM via crossystem
Added HWID query via crossystem if not available via ACPI. This populates
the hwclass field for crash reports.
BUG=None
TEST=Manually confirmed ARM platform crash reports contains correct hwclass
and manually confirmed ZGB report contains previously reported hwclas
Change-Id: I1216ed13c0b04d829313103d3bb736f5227a772b
Reviewed-on: http://gerrit.chromium.org/gerrit/7982
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Micah Catlin <micahc@chromium.org>
Commit-Ready: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
Sergiu Iordache [Wed, 3 Aug 2011 23:11:36 +0000 (16:11 -0700)]
crash-reporter: Update crash-reporter to work with ramoops
The old crash reporter used preserved to get the memory dump. Updated it
to use the upstream ramoops module. Also updated the unit tests.
Depends on other patches related to this bug report:
The backport series starting with:
http://gerrit.chromium.org/gerrit/#change,5342 until 5347 (included)
The series starting with: http://gerrit.chromium.org/gerrit/#change,5426
until 5429 (included)
http://gerrit.chromium.org/gerrit/#change,5159
BUG=chromium-os:12059
TEST=Ran module unit tests, ran logging_KernelCrashServer and
platform_KernelErrorPaths, checked manually that the
crash file existed.
Change-Id: I37bdb30513acfab79997e478af5de35ca33557fd
Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5432
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Michael Krebs [Fri, 5 Aug 2011 20:54:52 +0000 (13:54 -0700)]
crash-reporter: Dump crashes outside of cryptohome during autotests.
If the file "/mnt/stateful_partition/etc/collect_chrome_crashes" exists on
the target, dump crashes to /var/spool/crash/ instead of
/home/chronos/user/crash/. This is so they are easily available even after
logout.
BUG=chromium-os:18637
TEST=Ran unit and remote tests.
Change-Id: I340bbb0c1772123192c8bb87872bcda53fae5524
Reviewed-on: http://gerrit.chromium.org/gerrit/5419
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Elly Jones [Wed, 3 Aug 2011 15:30:11 +0000 (11:30 -0400)]
crash-reporter: disable CollectBadDirectory
Treecloser filed as crosbug.com/18622; temporarily disabling this test to reopen
the tree.
BUG=chromium-os:18622
TEST=Not anymore
Change-Id: I4b7467f6044e02ab1308f449d5aa530a15535933
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5214
Reviewed-by: Chris Masone <cmasone@chromium.org>
Michael Krebs [Wed, 27 Jul 2011 21:13:22 +0000 (14:13 -0700)]
Don't ignore chrome crashes when autotesting.
If the file "/mnt/stateful_partition/etc/collect_chrome_crashes" exists on
the target, allow chrome crashes to be reported by crash reporter. The
intention is that the autotest system will create this file. This is a
relatively temporary fix to help track down chrome problems, until the
crashes can be handled by crash reporter in the field as well.
BUG=chromium-os:17987, chromium-os:17898
TEST=Ran unit tests.
Change-Id: I68a584a0b861669117d8e97f5687b4c8fc876011
Reviewed-on: http://gerrit.chromium.org/gerrit/4861
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ken Mixter <kmixter@chromium.org>
Chris Masone [Sat, 14 May 2011 18:44:04 +0000 (11:44 -0700)]
[crash-reporter] bad merge broke the build
BUG=chromium-os:14304
TEST=build, features-test
Change-Id: I9c2c77c818b9277c506d5186d42677069b1f0704
Reviewed-on: http://gerrit.chromium.org/gerrit/905
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Chris Masone [Fri, 13 May 2011 23:57:09 +0000 (16:57 -0700)]
[crash-reporter] rolling to libchrome 87480
BUG=chromium-os:14304
TEST=emerge with features=test
Change-Id: Ida7067b3578619bbb99c8b5c626fd6301cdccd8d
Reviewed-on: http://gerrit.chromium.org/gerrit/887
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Michael Krebs [Sat, 16 Apr 2011 04:20:19 +0000 (21:20 -0700)]
crash-reporter: Make use of list_proxies to send crashes via a proxy when appropriate
BUG=chromium-os:6828
TEST=Manually ran crash_sender to make sure it would run curl with appropriate --proxy option. Manually ran curl using proxies from "http://proxyconfig.corp.google.com/wpad.dat". Ran a modified crash_sender manually to make sure it passed the appropriate "--proxy" arguments correctly.
Review URL: http://codereview.chromium.org/6802003
Change-Id: Ie1414fca1a7dbc265d8aad0eea32a736a5d30d54
Michael Krebs [Sat, 16 Apr 2011 00:18:27 +0000 (17:18 -0700)]
crash-reporter: Create a list_proxies command
Create a list_proxies command to be used by crash_sender to determine the correct proxy for a URL. This uses D-Bus to get them from either the browser or the session manager.
BUG=chromium-os:6828
TEST=Ran list_proxies command manually to test response for various URLs: "http://...", "https://...", empty/NULL, and invalid (eg. just "blah.com"). Also did this for the various proxy settings in the browser: direct, manual proxy configuration, and automatic proxy configuration. Ran list_proxies command using invalid D-Bus method name for proxy_resolver.StartMonitoring() to make sure timeout works. Ran a modified crash_sender manually to make sure it passed the appropriate "--proxy" arguments correctly.
Review URL: http://codereview.chromium.org/6730021
Change-Id: I738a4544f90218ffc7c2d36547de49b462ca749e
Michael Krebs [Thu, 7 Apr 2011 21:42:14 +0000 (14:42 -0700)]
Revert "Revert "crash-reporter: Don't send ps command lines with crash reporter""
This reverts commit
59d8695734dac2ce70b17d2a58049083e65e997d.
My original commit did not actually break anything, so this just puts it back.
BUG=chromium-os:13576
TEST=unit tests, logging_{UserCrash,CrashSender} autotests
Review URL: http://codereview.chromium.org/6765017
Change-Id: I5b9ebb2b210b86fb4efaf49c71dcd2562805c973
Doug Anderson [Thu, 7 Apr 2011 16:40:05 +0000 (09:40 -0700)]
Strip MAC addresses from dmesg sent w/ kcrash files.
BUG=chromium-os:13579
TEST=Ran the kernel_collector_test
rm -f /build/x86-mario/tmp/portage/chromeos-base/crash-reporter-9999/.tested; cros_workon_make --test --board=x86-mario crash-reporter
[ RUN ] KernelCollectorTest.StripSensitiveDataBasic
[ OK ] KernelCollectorTest.StripSensitiveDataBasic (1 ms)
[ RUN ] KernelCollectorTest.StripSensitiveDataBulk
[ OK ] KernelCollectorTest.StripSensitiveDataBulk (2 ms)
[ RUN ] KernelCollectorTest.StripSensitiveDataSample
[ OK ] KernelCollectorTest.StripSensitiveDataSample (0 ms)
Review URL: http://codereview.chromium.org/6777001
Change-Id: Ie2cd3d007f9ee2fb877d28280cfe62748c108bd2
Simon Glass [Wed, 6 Apr 2011 17:47:01 +0000 (10:47 -0700)]
Add ARM support
Adds support for scanning ARM backtraces so that kernel crash reporting
can work on ARM.
BUG=chromium-os:12454
TEST=cat /sys/kernel/debug/preserved/kcrash > x
crash_reporter -generate_kernel_signature x
Verify that it finds a backtrace properly.
FEATURES=test emerge-x86-mario crash-reporter
- check all tests pass (this will run both ARM and X86 tests)
Change-Id: I4dc6d7a2bae53d05883da9425ec8e9ac4a5c2bba
Review URL: http://codereview.chromium.org/6599022
Michael Krebs [Mon, 28 Mar 2011 20:41:07 +0000 (13:41 -0700)]
Revert "crash-reporter: Don't send ps command lines with crash reporter"
This reverts commit
78599c9f195a9c324d2b0eb5a048b677e6a4229c.
BUG=chromium-os:13576
TEST=
Review URL: http://codereview.chromium.org/6765002
Change-Id: I2c110e13199cc6d3741fa030065dbb405c2a049a
Michael Krebs [Fri, 25 Mar 2011 22:27:12 +0000 (15:27 -0700)]
crash-reporter: Don't send ps command lines with crash reporter
When unable to generate a crash, don't show the commands' arguments with
'ps' because they may contain PII.
Change-Id: I1e2f40e59535f4de08f43012727ab8e92bad8a0d
BUG=chromium-os:13206
TEST=unit tests, logging_UserCrash autotest
Review URL: http://codereview.chromium.org/6722017
Ken Mixter [Wed, 16 Mar 2011 19:47:20 +0000 (12:47 -0700)]
crash-reporter: keep ignoring chrome crashes even on dev builds
Change-Id: Idd8859958e626dc782e511f35fca5d45a2977f53
BUG=chromium-os:12911
TEST=unit tests and UserCrash
Review URL: http://codereview.chromium.org/6673002
Thieu Le [Thu, 3 Mar 2011 20:14:43 +0000 (12:14 -0800)]
Modify crash-reporter to collect crash information for unofficial builds.
The original code review link is here: http://codereview.chromium.org/6559003/
BUG=chromium-os:12207
TESTS=logging_UserCrash, logging_CrashSender, manual test which involves
purposely crashing a test to determine if minidump information is properly collected
Change-Id: I20274050cd698434951c65612e246f510c8082cb
TEST=
Review URL: http://codereview.chromium.org/6615021
Ken Mixter [Thu, 3 Mar 2011 16:47:38 +0000 (08:47 -0800)]
crash-reporter: Use standard logging and new libchromeos Process code
Change-Id: Ie085d61d4d79c0df38e51debaa044d701a860c89
BUG=none
TEST=unit tests / UserCrash / CrashSender
Review URL: http://codereview.chromium.org/6517001
Thieu Le [Mon, 28 Feb 2011 20:02:59 +0000 (12:02 -0800)]
Revert "Modify crash-reporter to collect crash information for unofficial builds."
This reverts commit
cb5a147e46dbfa454df9d56b4da23480742597c8.
BUG=None
TEST=
Review URL: http://codereview.chromium.org/6596045
Change-Id: If07530a743b19a76e9a15ef08825c45c38f9dd2b
Thieu Le [Mon, 28 Feb 2011 18:51:18 +0000 (10:51 -0800)]
Modify crash-reporter to collect crash information for unofficial builds.
BUG=chromium-os:12207
TESTS=logging_UserCrash, logging_CrashSender, manual test which involves
purposely crashing a test to determine if minidump information is properly
collected
Change-Id: Id2195125289a695515b1722442116d6a6d9c4895
Review URL: http://codereview.chromium.org/6559003
Ken Mixter [Thu, 10 Feb 2011 02:23:00 +0000 (18:23 -0800)]
crash-reporter: when exe symlink read fails send diags and still ignore chrome crashes
Change-Id: I0f43d5f61936ebb6420c357e58df45761facd4d0
BUG=6299
TEST=unit tests and UserCrash/CrashSender
Review URL: http://codereview.chromium.org/6480009
Ken Mixter [Tue, 25 Jan 2011 21:33:05 +0000 (13:33 -0800)]
crash-reporter: Add diagnostics to help diagnose failures in the wild
We add logging messages that are generated during invocation of core2md, but we also enable sending arbitrary system info based on the configuration file. In this case we add the list of running processes, meminfo, and dmesg.
Change-Id: Ifdf29b89dd60d56349fa39095d2aa07f6b5e2de2
BUG=chromium-os:6299,chromium-os:9345
TEST=UserCrash, unit tests
Review URL: http://codereview.chromium.org/6297004
Ken Mixter [Sat, 22 Jan 2011 14:16:40 +0000 (06:16 -0800)]
crash-reporter: Send systemwide stability information up to Chrome
Change-Id: Idcb3dff3b98951b41a55b9f48968c3608b44efae
BUG=9352
TEST=
1) UserCrash
2) Crash random process and verify Chrome indicates "other user" crashes
occurred in its stability UMA data.
Review URL: http://codereview.chromium.org/6138005
Dale Curtis [Mon, 10 Jan 2011 19:49:50 +0000 (11:49 -0800)]
Change path from /home/autotest to /usr/local/autotest.
Additional change for the relocation of Autotest from /home/autotest to /usr/local/autotest. See http://codereview.chromium.org/6090004/
Change-Id: I2995fdc76f56d4efbb6450d4a7da3adc321eae91
BUG=chromium-os:10799
TEST=Will test as whole with rest of /usr/local changes.
Review URL: http://codereview.chromium.org/5964016
Ken Mixter [Wed, 15 Dec 2010 01:44:11 +0000 (17:44 -0800)]
crash-reporter: Capture and send recent update_engine logs when it crashes
We also disallow more than 4 nested crashes. This way we know if core2md crashes for instance, but not if crash_reporter crashes while handling the core2md crash that came from crash_reporter. Note that the kernel does not know about parent/child process relationships, it just counts concurrent handling, so it is possible that some of many crashing processes will be discarded.
See crash report id
473c22ed428d33a9 for an example report with update_engine logs.
Change-Id: I9ff9f03a94dc87d2d42840511c2e5e42ee37cea8
BUG=9176
TEST=UserCrash,CrashSender,unit tests
Review URL: http://codereview.chromium.org/5814001
Simon Que [Wed, 1 Dec 2010 01:10:54 +0000 (17:10 -0800)]
Collect suspend and resume info from power manager
Updated the unclean shutdown collector to check and report the
modification times of trace files left by power manager to indicate that
the system was suspended and that it was running on low battery.
These files are interpreted by the unclean shutdown collector to
determine the cause of an unclean shutdown -- either the battery ran
out during suspend or the battery ran out after resuming from a low
battery-induced suspend and it continued to run on battery.
BUG=chromium-os:1472
TEST=Let the battery run below the cutoff, suspend & resume, and then
remove the battery to simulate running dry; check crash reporter
logs. Alternatively/additionally, let it suspend and remove the battery
while suspended. Restart and check crash reporter logs.
Signed-off-by: Simon Que <sque@chromium.org>
Change-Id: I8e6767e8457afb7abf1e7300eac020adda1ebb48
Review URL: http://codereview.chromium.org/3644007
Ken Mixter [Fri, 19 Nov 2010 01:29:32 +0000 (17:29 -0800)]
crash-reporter: use HTTPS when sending crashes
Change-Id: Ibca5616ba449dd1f96ae418a46b372d1a2f55412
BUG=9352
TEST=manual update and User/CrashSender
Review URL: http://codereview.chromium.org/5092009
Ken Mixter [Wed, 10 Nov 2010 00:14:38 +0000 (16:14 -0800)]
crash-reporter: Ignore Chrome crashes, relying on Chrome breakpad
Change-Id: I08e44d2c8b6be839d18efd2fe6e8b612a61ae723
BUG=8841
TEST=bvts
Review URL: http://codereview.chromium.org/4499006
Ken Mixter [Sun, 7 Nov 2010 22:13:58 +0000 (14:13 -0800)]
crash-reporter: add missing header file from last commit
Change-Id: I85fd4f6b4eb851209e36d4ba803889abd00bf274
TBR=petkov
BUG=7987
TEST=unittests pass
Review URL: http://codereview.chromium.org/4649002
Ken Mixter [Sun, 7 Nov 2010 21:45:45 +0000 (13:45 -0800)]
crash-reporter: Avoid writing through symlinks.
BUG=7987
TEST=bvts
Change-Id: I875adeb5073936e790beb93f6a223a1642131cbd
Review URL: http://codereview.chromium.org/4603001
Ken Mixter [Tue, 2 Nov 2010 01:05:30 +0000 (18:05 -0700)]
crash-reporter: add filtering to make crash tests resilient to crashy builds
BUG=8415
TEST=Run UserCrash and CrashSender while an unrelated process is crashing at about 10Hz
Change-Id: I7f86df8caec19278337ca463f09705e4fcd788f3
Review URL: http://codereview.chromium.org/4190014
Ken Mixter [Mon, 1 Nov 2010 20:37:41 +0000 (13:37 -0700)]
crash-reporter: fix bug where we were sending "undefined" as all stack signatures
Also, move the logic for picking which extra parameters to send up above where mock sending ends so UserCrash detects this regression in the future. And merge unknown and undefined special strings into one to avoid confusion.
Change-Id: Ic55a0c5b473a0cef39eac2c1250d1607deffe050
BUG=8266
TEST=User/KernelCrash and CrashSender
Review URL: http://codereview.chromium.org/4139011
Ken Mixter [Thu, 28 Oct 2010 22:42:37 +0000 (15:42 -0700)]
crash-reporter: write conversion failure diagnostics into fake dmp files
Change-Id: I9f1ca92def3e1d0fa43b3bef0f2a72d367953926
BUG=6299,7782
TEST=bvts
Review URL: http://codereview.chromium.org/4088003
Ken Mixter [Tue, 26 Oct 2010 21:45:01 +0000 (14:45 -0700)]
crash-reporter: Generate kernel crash signatures for server-side grouping of similar crashes
BUG=5868
TEST=KernelCrash, UserCrash, CrashSender, unittests, and manual inspection of sent report.
Change-Id: I31991895c9ac719ac1832d588ae3360500ef0c26
Review URL: http://codereview.chromium.org/4018008
Ken Mixter [Wed, 20 Oct 2010 21:38:53 +0000 (14:38 -0700)]
crash-reporter: avoid deadlock if dbus-daemon is hanging
Change-Id: I40ba7fb556217bf0bea156e0496145d7195a1229
BUG=7783
TEST=sudo pkill -STOP dbus-daemon;sleep 100&ill -SEGV $!;pgrep crash_reporter shows crash_reporter finished dumping sleep, even though dbus-daemon is unreachable. Also ran UserCrash and CrashSender.
Review URL: http://codereview.chromium.org/3976001
Ken Mixter [Wed, 20 Oct 2010 18:45:46 +0000 (11:45 -0700)]
crash-reporter: Fix race between test code and rsyslogd
Change-Id: I2297d03f7da88b0fbde1303411228b4d73ec6bf1
BUG=7765
TEST=Run crashsender 1000 times
Review URL: http://codereview.chromium.org/3893005
Ken Mixter [Mon, 18 Oct 2010 21:42:20 +0000 (14:42 -0700)]
crash-reporter: Avoid using system to invoke core2md
Change-Id: I1fc0b4dd6e4e84cb999ba61fedd43fc74a8fa1ba
BUG=6941
TEST=bvts
Review URL: http://codereview.chromium.org/3755011
Ken Mixter [Mon, 18 Oct 2010 19:26:05 +0000 (12:26 -0700)]
crash-reporter: send payload sizes to help diagnose corruption
Change-Id: Ia68990138ebcc3dd6d644fe30d0721dde41c567e
BUG=6299
TEST=UserCrash, CrashSender, KernelCrash
Review URL: http://codereview.chromium.org/3820004
Ken Mixter [Mon, 18 Oct 2010 19:09:31 +0000 (12:09 -0700)]
crash-reporter: fix race condition between cron crash_sender and test invoked
Change-Id: I274072faffcb49b1910352cbcc5005e3144d9ab0
BUG=7765
TEST=CrashSender and UserCrash
Review URL: http://codereview.chromium.org/3748011
Ken Mixter [Fri, 1 Oct 2010 22:40:11 +0000 (15:40 -0700)]
crash-reporter: detect guest mode and defer crash sending
Change-Id: I8952fc6e701521dbb8618889d96ebc025f713427
BUG=7203
TEST=Ran BVTs
Review URL: http://codereview.chromium.org/3520011
Ken Mixter [Thu, 30 Sep 2010 22:30:10 +0000 (15:30 -0700)]
Add meta files to crash directory, enabling OS version at crash time.
Adding meta files also:
1) ensures atomically added crash reports
2) allows us to remove orphaned crash report payload files
(such as core files)
3) gives us better control over the number of reports in
crash directory
While we're here, also made these minor changes
1) send board (x86-generic, x86-mario, etc) to crash server
2) send hwclass to crash server
3) Only record crash reports when metrics are enabled.
4) No longer allow crash reporting to staging server.
BUG=6100,5805,5624,6865
TEST=unit tests plus UserCrash,CrashSender,KernelCrash autotests
Change-Id: Ieea9bdc8e0680b379c65b91cc56ca0611dd0f31c
Review URL: http://codereview.chromium.org/3436029
Thieu Le [Wed, 22 Sep 2010 00:07:05 +0000 (17:07 -0700)]
Fix build break.
BUG=6446
TEST=unit test, logging_UserCrash
Change-Id: Iac9f5484d9218ef91ae606ef410409df5ec16382
Review URL: http://codereview.chromium.org/3380022
Kenneth Waters [Tue, 21 Sep 2010 23:08:54 +0000 (16:08 -0700)]
Revert "Add call to logging::InitLogging() during startup to write to stderr."
This reverts commit
93cb6e57175e8e622c8f417bfad0213b125b57db.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3390021
Change-Id: I979ddb3ab2542968e1f9a521344389bc7edf8492
ChromeOS Developer [Tue, 21 Sep 2010 21:05:23 +0000 (14:05 -0700)]
Add call to logging::InitLogging() during startup to write to stderr.
There's no need to write to a file since we only log messages for commandline parameter validations (ie. usage errors).
BUG=6446
TEST=unit test
Change-Id: I0e55d569534f953526a6b788dbc6b3e284ff8b4f
Review URL: http://codereview.chromium.org/3464008
Ken Mixter [Fri, 17 Sep 2010 20:50:42 +0000 (13:50 -0700)]
Increase number of enqueued crash files, sending rate, and fix minor bug.
Up to 32 crashes per spool and 32 sends per day.
BUG=6355,6782
Change-Id: I99e86265c035ad62937aa135467681be8ef70f9a
TEST=UserCrash and CrashSender
Review URL: http://codereview.chromium.org/3414006