Commit graph

38 commits

Author SHA1 Message Date
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