Commit graph

49 commits

Author SHA1 Message Date
Simon Glass
d74cc09bbd 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
2011-04-06 10:47:01 -07:00
Michael Krebs
c7dcf3f52c 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
2011-03-28 13:41:07 -07:00
Michael Krebs
ec951c7613 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
2011-03-25 15:27:12 -07:00
Ken Mixter
5d3a1a2c35 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
2011-03-16 12:47:20 -07:00
Thieu Le
1652fb2cc2 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
2011-03-03 12:14:43 -08:00
Ken Mixter
a324932e06 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
2011-03-03 08:47:38 -08:00
Thieu Le
f92f4caa84 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
2011-02-28 12:02:59 -08:00
Thieu Le
604f5c0d3d 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
2011-02-28 10:51:18 -08:00
Ken Mixter
d49d362f61 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
2011-02-09 18:23:00 -08:00
Ken Mixter
1b8fe01558 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
2011-01-25 13:33:05 -08:00
Ken Mixter
1d3c304083 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
2011-01-22 06:16:40 -08:00
Dale Curtis
c4e01cc146 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
2011-01-10 11:49:50 -08:00
Ken Mixter
c49dbd4775 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
2010-12-14 17:44:11 -08:00
Simon Que
3f7ed5d14a 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
2010-11-30 17:10:54 -08:00
Ken Mixter
814ef465a4 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
2010-11-18 17:29:32 -08:00
Ken Mixter
2105b49796 crash-reporter: Ignore Chrome crashes, relying on Chrome breakpad
Change-Id: I08e44d2c8b6be839d18efd2fe6e8b612a61ae723

BUG=8841
TEST=bvts

Review URL: http://codereview.chromium.org/4499006
2010-11-09 16:14:38 -08:00
Ken Mixter
a5118a97d5 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
2010-11-07 14:13:58 -08:00
Ken Mixter
9b34647453 crash-reporter: Avoid writing through symlinks.
BUG=7987
TEST=bvts

Change-Id: I875adeb5073936e790beb93f6a223a1642131cbd

Review URL: http://codereview.chromium.org/4603001
2010-11-07 13:45:45 -08:00
Ken Mixter
c6a58e0f73 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
2010-11-01 18:05:30 -07:00
Ken Mixter
7f2830e138 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
2010-11-01 13:37:41 -07:00
Ken Mixter
207694d3f4 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
2010-10-28 15:42:37 -07:00
Ken Mixter
afcf80821c 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
2010-10-26 14:45:01 -07:00
Ken Mixter
0096b43d0f 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
2010-10-20 14:38:53 -07:00
Ken Mixter
133983b2bb 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
2010-10-20 11:45:46 -07:00
Ken Mixter
2953c3a87a crash-reporter: Avoid using system to invoke core2md
Change-Id: I1fc0b4dd6e4e84cb999ba61fedd43fc74a8fa1ba

BUG=6941
TEST=bvts

Review URL: http://codereview.chromium.org/3755011
2010-10-18 14:42:20 -07:00
Ken Mixter
c909b69446 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
2010-10-18 12:26:05 -07:00
Ken Mixter
30c976216b 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
2010-10-18 12:09:31 -07:00
Ken Mixter
44973b0291 crash-reporter: detect guest mode and defer crash sending
Change-Id: I8952fc6e701521dbb8618889d96ebc025f713427

BUG=7203
TEST=Ran BVTs

Review URL: http://codereview.chromium.org/3520011
2010-10-01 15:40:11 -07:00
Ken Mixter
ee849c5ef4 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
2010-09-30 15:30:10 -07:00
Thieu Le
563d08ba7d Fix build break.
BUG=6446

TEST=unit test, logging_UserCrash

Change-Id: Iac9f5484d9218ef91ae606ef410409df5ec16382

Review URL: http://codereview.chromium.org/3380022
2010-09-21 17:07:05 -07:00
Kenneth Waters
cd71405362 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
2010-09-21 16:08:54 -07:00
ChromeOS Developer
9dc2fbf616 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
2010-09-21 14:05:23 -07:00
Ken Mixter
da5db7a830 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
2010-09-17 13:50:42 -07:00
Hugh Dickins
6fba658f1f Fix Unexpected crash_sender stdout/stderr when testing Official image
logging_KernelCrashServer and logging_UserCrash tests fail on an Official
image, because crash_sender's is_official() test leaks the "Official" line:
grep needs the quiet option (and does not need a cut).

BUG=837
TEST=logging_UserCrash

Signed-off-by: Hugh Dickins <hughd@chromium.org>

Review URL: http://codereview.chromium.org/3357010
2010-09-08 20:59:58 -07:00
Hugh Dickins
f174fc08dc Fix collection of kernel crash into /var/spool/crash
No kcrash was collected because the IsEnabled() test always failed:
we must do the kernel_collector->Enable() first.  I've not checked
if this might break the Override path (for local testing): it's more
important for the feature to work for real than in an artificial test.

BUG=837,5865
TEST=logging_KernelCrashServer or manual procedure

Signed-off-by: Hugh Dickins <hughd@chromium.org>

Review URL: http://codereview.chromium.org/3317007
2010-09-08 20:55:26 -07:00
Ken Mixter
023e207f13 Fix problem with crash_sender being able to run multiple times concurrently.
BUG=6134
TEST=Run CrashSender and UserCrash, also test starting those tests while crash_sender is already running.

Change-Id: Ie80c450f6b0da1b67398aa67fd9b74903abc430b

Review URL: http://codereview.chromium.org/3197024
2010-08-26 18:42:02 -07:00
Ken Mixter
04ec10fc93 Limit the number of crash reports to enqueue at once
BUG=5357

Change-Id: Ib21086cdd34c938def885d625a165ba2fa0879a4

Review URL: http://codereview.chromium.org/3209003
2010-08-26 16:02:02 -07:00
Ken Mixter
0340316050 Collect and send kernel crash diagnostics
BUG=1512,1914

Review URL: http://codereview.chromium.org/3179006
2010-08-18 15:23:16 -07:00
Ken Mixter
479b148ba7 Hard fail immediately in crash_sender if /usr/bin/find is not installed
BUGS=5778
TEST=BVTs

Review URL: http://codereview.chromium.org/3122024
2010-08-18 14:02:01 -07:00
Ken Mixter
7ac7a70a59 Move leave_core where similar files exist
BUG=5696

Review URL: http://codereview.chromium.org/3121015
2010-08-13 15:43:34 -07:00
Chris Masone
f9322f734f Update to new libchrome APIs
BUG=none
TEST=compile

Change-Id: Ie494a6536665b635b82725dd6a82959974b02a75

Review URL: http://codereview.chromium.org/3138010
2010-08-11 19:56:51 -07:00
J. Richard Barnette
0e6037cfc1 Add LICENSE file 2010-08-05 14:13:48 -07:00
Ken Mixter
777484c41c Start invoking core2md to implement full system crash reporting
BUG=4741

Review URL: http://codereview.chromium.org/3040013
2010-07-23 16:22:44 -07:00
Ken Mixter
6993256118 Fix crash-reporter test build
Review URL: http://codereview.chromium.org/2944003
2010-07-09 12:37:59 -07:00
Ken Mixter
091993c72b Send client ID in crash report
BUG=4110,988

Review URL: http://codereview.chromium.org/2849038
2010-07-01 15:09:24 -07:00
Darin Petkov
c7f8528cdc Notify metrics daemon of kernel crashes.
BUG=none
TEST=unit tests, ran crash_reporter --init on the device

Review URL: http://codereview.chromium.org/2847017
2010-06-24 11:43:12 -07:00
Chris Sosa
522c061f83 Change include paths to reflect new directory.
TEST=Tested with new ebuild.

Review URL: http://codereview.chromium.org/2819009
2010-06-18 11:08:11 -07:00
Chris Sosa
69e37209b3 TBR: Adding petkov's patch committed today in other repo 2010-06-16 17:55:31 -07:00
Chris Sosa
e4a86037f4 Initial commit of crash reporter repo 2010-06-16 17:08:34 -07:00