Commit graph

184 commits

Author SHA1 Message Date
Ben Chan
3c6b82c4c7 crash-reporter: Fix C++ style issues in KernelCollector.
BUG=None
TEST=`FEATURES=test emerge-$BOARD crash-reporter`

Change-Id: Ib33a23059878380425f6eb79385dc67141ad0f77
Reviewed-on: https://chromium-review.googlesource.com/209746
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2014-07-26 00:01:18 +00:00
Ben Chan
120c675df0 crash-reporter: Add MIPS support for KernelCollector.
BUG=chromium:396465
TEST=`FEATURES=test emerge-x86-generic crash-reporter`
TEST=`FEATURES=test emerge-amd64-generic crash-reporter`
TEST=`emerge-arm-generic crash-reporter`
TEST=`emerge-mipsel-o32-generic-generic crash-reporter`

Change-Id: I270b56d3f0b6941c97ebec6e736230701e5c3e1f
Reviewed-on: https://chromium-review.googlesource.com/209485
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2014-07-23 23:14:59 +00:00
Bertrand SIMONNET
f7ad519b3d Remove the dependency of platform.gyp to crash-reporter
We are creating a standalone ebuild for crash-reporter. platform.gyp should not
depend on crash-reporter.gyp as crash-reporter will be build and installed by
chromeos-base/crash-reporter.

BUG=chromium:391999
TEST=FEATURES=test emerge-amd64-generic platform2.
TEST=FEATURES=test emerge-amd64-generic crash-reporter.

CQ-DEPEND=CL:206918

Change-Id: I726ed0c847e361b7f03c2ef82fbb8410f40b6c80
Reviewed-on: https://chromium-review.googlesource.com/206919
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-07-14 18:39:14 +00:00
Ben Chan
ae88303ac0 platform2: Remove redundant LICENSE files.
There is a common LICENSE file at the top level of the platform2
repository. The LICENSE files in individual packages are no longer
necessary and thus removed by this CL.

BUG=None
TEST=Trybot runs on paladin, release, and chromiumos-sdk builders.

Change-Id: If9e26ef5e40c8e3ada4d7d29575bcdf61edfb39d
Reviewed-on: https://chromium-review.googlesource.com/206947
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2014-07-08 19:30:27 +00:00
Bertrand SIMONNET
9769dc865b Update gyp files to depend on metrics' standalone ebuild.
Metrics is now installed by chromeos-base/metrics.
Platform2 packages should depend on it through the variable:deps mechanism
instead of depending directly on metrics' gyp file.

BUG=chromium:387923
TEST=Build platform2. metrics gets installed and the tests succeed.
TEST=Trybot run on daisy-release, lumpy-incremental-paladin, link-release,
  duck-release, x86-mario-release.

CQ-DEPEND=CL:205312

Change-Id: I07607d5fa574ce3c273fc4189590453edbee2aa4
Reviewed-on: https://chromium-review.googlesource.com/205299
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-06-26 02:31:43 +00:00
Bertrand SIMONNET
04661e3375 crash-reporter: Create a standalone ebuild for system_api
system_api is required by a lot of platform2 packages. We need it to be in a
standalone ebuild in order for other packages to depend on it.

This package installs the common headers and compiles the protobufs into static
libraries.

BUG=chromium:386223
TEST=FEATURES=test emerge-amd64-generic platform2.
TEST=trybot run on daisy, link, duck, x86-mario.
TEST=trybot run on lumpy-incremental-release.

CQ-DEPEND=CL:204594

Change-Id: I235b5baf03a4497352f7d53ab68326ddb4e9676a
Reviewed-on: https://chromium-review.googlesource.com/204581
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-06-21 02:23:09 +00:00
Ben Chan
7e77690375 crash-reporter: Fix coding style and cpplint issues.
BUG=chromium:385849
TEST=`FEATURES=test emerge-$BOARD platform2`
TEST=`cpplint.py --filter=--build/header_guard,-build/include_order *.h *.cc`

Change-Id: I3c24dd9487df50cdb22fc1c7739c9e95e452afae
Reviewed-on: https://chromium-review.googlesource.com/204487
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
2014-06-19 03:32:02 +00:00
Bertrand SIMONNET
f7181dfe7a crash-reporter: Migrate libchromeos to its own ebuild
All platform2 packages should have their own ebuild that will be compiled
independently. Packages should DEPEND on libchromeos and should not have a gyp
dependency on libchromeos's gyp file anymore.

BUG=chromium:381372
TEST=emerge-daisy libchromeos && emerge-daisy platform2 work
TEST=trybot run on daisy, link, mario and duck.
TEST=trybot run on lumpy-incremental-paladin.

CQ-DEPEND=CL:202748

Change-Id: I2f6fe6e8572a533d74931db2dd850fe31d9041dc
Reviewed-on: https://chromium-review.googlesource.com/202762
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-06-18 11:00:28 +00:00
Bertrand SIMONNET
cb373dd610 crash-reporter: Update gyp files to use libchromeos from src/platform2
libchromeos was moved from src/platform to src/platform2. This CL updates
the gyp files to use the new location.

BUG=chromium:370258
TEST=FEATURES=test emerge-amd64-generic platform2
TEST=trybot run on daisy, link, mario and duck

CQ-DEPEND=CL:202334

Change-Id: I8536a08aee17073be8544b7e60b205aafb2e0828
Reviewed-on: https://chromium-review.googlesource.com/202337
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-06-03 04:25:20 +00:00
Bertrand SIMONNET
6f970ed8fc crash-reporter: Update gyp file to use src/platform2/common-mk
We are moving the packages built by platform2's ebuild into src/platform2.
We need packages to use src/platform2/common-mk instead of
src/platform/common-mk.

BUG=chromium:378554
TEST=emerge-daisy platform2
TEST=trybot run on daisy, link, mario and duck

CQ-DEPEND=CL:201938

Change-Id: Ic154c59f61f7f95df5678a2033b74983b12f4dec
Reviewed-on: https://chromium-review.googlesource.com/201967
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-05-31 01:46:26 +00:00
Mike Frysinger
14129966b0 crash_sender: delete redundant logic for parallel runs
A recent commit added global locking support via `flock` (see CL:65556).
With that in place, we no longer need this ad-hoc pid checking.  Advantage
is that the flock is race free (both with file reads/writes and pid #s).

BUG=chromium:199491
TEST=`cbuildbot x86-generic-full` works
TEST=`crash_sender` on board works
CQ-DEPEND=CL:201495

Change-Id: I00d48544856cc5fad60c6129f5c193abdde45f02
Reviewed-on: https://chromium-review.googlesource.com/169486
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-30 23:28:02 +00:00
Thiemo Nagel
47785c0e17 crash_sender: re-order send_crashes() logic
send_crashes() is re-ordered to make sure that crashes are
deleted at the earliest possible point in time, especially that
crash deleting cannot be blocked if the crash upload pipeline is
blocked for some reason.  The intention is to free disk space as
soon as possible, but there are also privacy implications of
removing crash data as soon as it is determined that the user has
not consented to its upload.

BUG=chromium:338977
TEST=`cbuildbot x86-generic-full` passes
CQ-DEPEND=CL:200553

Change-Id: I797cf8430185b0d2a4c3e615c6803e95b59c8ac7
Reviewed-on: https://chromium-review.googlesource.com/200060
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-05-28 08:07:48 +00:00
Mike Frysinger
0e31ecbde5 crash-sender: set timeout to 4 hours
A single run of crash_sender might take some time to upload a report
(if the connection is pretty slow).  Give the system 4 hours to upload
at least one report.

BUG=chromium:377981
TEST=`cbuildbot x86-generic-full` passes
CQ-DEPEND=CL:201719

Change-Id: I4d3870b961653c7f0ca85e1015f371919125e846
Reviewed-on: https://chromium-review.googlesource.com/201404
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-28 04:51:46 +00:00
Ben Chan
f30c641225 crash-reporter: Update to build against libchrome-271506.
BUG=chromium:375032
TEST=`FEATURES=test emerge-$BOARD platform2`

Change-Id: I3984dee513690711e277e5fa8939ca5f7910d180
Reviewed-on: https://chromium-review.googlesource.com/201184
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2014-05-23 17:56:22 +00:00
Thiemo Nagel
a39667d908 crash_sender: ignore missing files to prevent upload failure
Don't try to upload missing files, instead send the reports without them to
avoid failure in curl, breaking the cycle of try-fail-try-fail.

BUG=chromium:338977
TEST=manual test by copying the script to a Chromebook
CQ-DEPEND=CL:200061

Change-Id: If35828b48b7746bdfae519e4777cc0d7e9245e0e
Reviewed-on: https://chromium-review.googlesource.com/199070
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-22 02:25:04 +00:00
Thiemo Nagel
3029e6facb crash_sender: add 30sec holdoff for fresh crashes
As a rule, the .meta file of a crash report should only be
created after the corresponding crash data files have been
written to avoid the crash report to be sent prematurely without
data files.  Merely as an additional safeguard, this changeset
prevents a crash report to be sent within 30 seconds of writing
the .meta file.  This functionality integrates with the existing
sleep due to SECONDS_SEND_SPREAD.

BUG=chromium:338977
TEST=`cbuildbot x86-generic-full` passes

Change-Id: Id3651eb697527ca5b976274933b0ca2ee09870e2
Reviewed-on: https://chromium-review.googlesource.com/200061
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-05-21 04:17:53 +00:00
Thiemo Nagel
369af352e3 crash_sender: remove obsolete is_on_3g(), improve comment
BUG=None
TEST=`cbuildbot x86-generic-full` passed

Change-Id: I49e259d42b1edaf0fb43ee912fa99799ca87f08c
Reviewed-on: https://chromium-review.googlesource.com/200440
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-19 23:06:01 +00:00
Thiemo Nagel
9895096f8b crash_sender: fix orphan logic, prevent deletion of *.log.tar.xz
get_base() was broken for files with multiple extensions which leads the orphan
logic to delete all such files that are older than 1 day.  This patch set fixes
get_base().

BUG=chromium:338977
TEST=manual test of code fragment
TEST=`cbuildbot {arm,amd64,x86}-generic-full` pass
CQ-DEPEND=CL:199820

Change-Id: I1b712f1a5cfc848e5bc2a86c97e0a3e88ce6250d
Reviewed-on: https://chromium-review.googlesource.com/199511
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-16 06:32:04 +00:00
Mike Frysinger
f1a5014637 use IGNORE_EINTR w/close
HANDLE_EINTR is both not safe and not useful on Linux systems.
Switch to IGNORE_EINTR like Chromium has done everywhere.

See http://crbug.com/269623 for details.

BUG=chromium:373154
TEST=`cbuildbot {arm,amd64,x86}-generic-full` passes

Change-Id: Ib7b5c6913a63cc391005e9814200b87ed7ed7733
Reviewed-on: https://chromium-review.googlesource.com/199850
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-15 23:54:00 +00:00
Thiemo Nagel
8fce285905 UserCollector: only create meta file if payload write succeeds
This avoids creating meta files that are referencing a non-existant payload
which can block crash sending.

BUG=chromium:338977
TEST=Running unit tests locally did succeed.

Change-Id: Ia7039e679150490571d57a0960e984590905ee52
Reviewed-on: https://chromium-review.googlesource.com/199060
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-05-15 23:52:45 +00:00
Thiemo Nagel
618b579f4f crash_sender: include verbose curl output in error logs
BUG=None
TEST=Manual
TEST=`cbuildbot {arm,amd64,x86}-generic-full` pass

Change-Id: I7ee8f98aa1721d50bb8b86fd84b50d9432eaaa9d
Reviewed-on: https://chromium-review.googlesource.com/198682
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-05-14 00:24:14 +00:00
Bertrand SIMONNET
f9f7807c88 Add crash-sender's init script to crash-reporter
Part of a three CLs commit that moves crash-sender.conf from platform/init to
platform/crash-reporter.

BUG=chromium:346449
TEST=build chromeos-init and platform2. crash-sender.conf is now owned by
platform2.

CQ-DEPEND=If4ed3501dc7764515eee5284b608859b97652625
CQ-DEPEND=I1f536361e4089a38c70ee9b77f126b1b9881abd8

Change-Id: I7e8da8b755f531bf1987c369692cf570eb7a5548
Reviewed-on: https://chromium-review.googlesource.com/198602
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
2014-05-07 19:58:54 +00:00
Lei Zhang
9b1f300139 crash-reporter: Write out a magic string for Chrome crashes.
Also do some much needed code cleanup.

BUG=chromium:363660
TEST=emerge platform2

Change-Id: Ica9abfd854e2c77d970851805989c86a6a45fdee
Reviewed-on: https://chromium-review.googlesource.com/196764
Commit-Queue: Lei Zhang <thestig@chromium.org>
Tested-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2014-04-25 05:20:01 +00:00
Ben Chan
553e28c233 crash-reporter: Remove libbase_ver override in gyp file.
CL:194476 modified platform2 to build against libchrome-242728. The
libbase_ver override in the gyp file is no longer needed.

BUG=chromium:361748
TEST=`FEATURES=test emerge-$BOARD platform2`
TEST=Verify that crash-reporter is linked against libchrome-242728.

Change-Id: I46a362165e08839bce82748f55f8f09595b8ac18
Reviewed-on: https://chromium-review.googlesource.com/196725
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2014-04-24 21:57:15 +00:00
Bertrand SIMONNET
ebad658b41 Add crash reporter's init scripts
Part of a three CLs commit that moves crash reporter scripts out of
platform/init.

BUG=chromium:346449
TEST=none

CQ-DEPEND=Ib74673a38ef3886b9b23e2f152dd796a3e29855a
CQ-DEPEND=I079759d0a096c50600c292cc37d3486b1c44e56a

Change-Id: Icaad09443e60ff8dd4527d426cc11204a65c5f96
Reviewed-on: https://chromium-review.googlesource.com/194298
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
2014-04-17 16:27:36 +00:00
Mike Frysinger
042c3d406a crash_sender: log product info in new list format
The 00A0 unicode space hack hasn't been reliable.  The latest Chromium
code supports a 3rd field in the crash list though, so let's use that
instead.  The UI has already been updated to look for this:
https://codereview.chromium.org/219383008/

BUG=chromium:210624
TEST=logged a system crash and looked at crashes page
TEST=logged a chrome crash and looked at crashes page
TEST=`cbuildbot {x86,amd64}-generic-full` pass (VMTests)

Change-Id: Icce0d9d26276143a1604b8eef5c68a2a6417c912
Reviewed-on: https://chromium-review.googlesource.com/193611
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-04-09 02:26:25 +00:00
Pawel Osciak
0446aab3b5 crash_collector: Disable kernel task state collection for chrome crashes
Currently this results in outputting a lot of backtraces to system logs,
making it hard to find other failures.
Disable until a better way to do this is introduced.

BUG=chromium:352834
TEST=P2_TEST_FILTER="crash-reporter::*" FEATURES=test emerge-link
platform2

Change-Id: If6aa7c2d0d5fc9b0e0a902caacec84c2beb22b9c
Reviewed-on: https://chromium-review.googlesource.com/191623
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: Pawel Osciak <posciak@chromium.org>
Commit-Queue: Pawel Osciak <posciak@chromium.org>
2014-04-02 02:29:46 +00:00
Ben Chan
dffc8ced0b crash-reporter: Update OWNERS file to set 'noparent'.
BUG=None
TEST=None

Change-Id: I560e5247114f6be2c1689e8cdb636dc914332ef7
Reviewed-on: https://chromium-review.googlesource.com/191944
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2014-03-27 20:36:00 +00:00
Mike Frysinger
bfdf4a8913 user_collector: use %P instead of %p
The latter will give us the PID as seen in the current PID namespace,
but since the crash handler always runs in the top most PID namespace,
that is meaningless to us.  Instead, use the %P option so we see the
PID in the top most namespace.

BUG=chromium:351568
TEST=`cbuildbot amd64-generic-full` passes # linux-3.10
TEST=`cbuildbot x86-alex-release` passes   # linux-3.4
TEST=`cbuildbot link-release` passes       # linux-3.8
CQ-DEPEND=CL:190011
CQ-DEPEND=CL:190020
CQ-DEPEND=CL:190012
CQ-DEPEND=CL:190021

Change-Id: Ic619c4e7514e2824f7ba31b73cb9e11ec4092774
Reviewed-on: https://chromium-review.googlesource.com/190010
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-03-18 20:34:53 +00:00
B. simonnet
d24164e255 Use GOOGLE_CRASH_ID as the default crash report id
crash_sender will use crash id and crash version id, in order:
* the product name and product version in the meta file if present or
* GOOGLE_CRASH_ID and GOOGLE_CRASH_VERSION_ID from /etc/os-release or
* ID and VERSION_ID from /etc/os-release
* ChromeOS and chrome os version otherwise

BUG=chromium:343615
TEST=Built chromeos-base/platform2 and deployed it to a Chromebook.
Added a test report in /var/spool/crash.
Ran crash_sender in MOCK_CRASH_SENDING mode
Changed the values of variable in /etc/os-release and observed that the
sent values were correct
TEST=Set GOOGLE_CRASH_ID to Brillo, remove protection for test images,
observe that the crashes got logged in the Brillo bucket.
TEST=trybot on x86, amd64, daisy and duck

Change-Id: I30b87a344e7868e4a937c79b89c6d07ff0fcc6e4
Reviewed-on: https://chromium-review.googlesource.com/187035
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
2014-03-01 02:38:41 +00:00
Yunlian Jiang
9f52040ac9 crash-reporter: convert number to int before calling abs()
BUG=chromium:347721
TEST=emerge-x86-generic crash-reporter passes.

Change-Id: Id37528c44d5c318b917932ebc755eb6b4ca01e8f
Reviewed-on: https://chromium-review.googlesource.com/188212
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
2014-02-28 03:41:43 +00:00
Luigi Semenzato
325a2e313d crash reporter: avoid repeated warning collection
The warning collector daemon parses the entire syslog every time it
starts (almost exclusively at boot).  This change makes the collector
start reading at the end of /var/log/messages (where it waits for further
input) rather than the beginning.  The collector will miss any warnings
that may have occurred between the last warning reported, and the daemon
restart.

BUG=chromium:343954
TEST=none yet
BRANCH=none

Change-Id: I5e9b141561365b9a1d328ed6283c27e8b3369a6f
Reviewed-on: https://chromium-review.googlesource.com/186605
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
2014-02-25 04:03:09 +00:00
Luigi Semenzato
b20c9ef8e9 Push full warning signature instead of its hash only.
A previous change computed a signature including the
function name and offset, but failed to send it to
the crash server.  This fixes the problem.

BUG=chromium:328948
TEST=none

Change-Id: I2ff2e548ee1a8feebd6352433c9bd0f96076f15d
Reviewed-on: https://chromium-review.googlesource.com/180561
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
2014-02-14 18:52:41 +00:00
Ben Chan
82deea83b0 Update metrics dependency to use slotted libmetrics library.
BUG=chromium:342866
CQ-DEPEND=CL:185187
CQ-DEPEND=CL:186026
TEST=Trybot run on paladin, release, and chromiumos-sdk builders.

Change-Id: I54f3f2055293160ad807c48a126e411c6188b6f9
Reviewed-on: https://chromium-review.googlesource.com/186028
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
2014-02-12 19:40:02 +00:00
Mike Frysinger
f1a557d198 drop unused makefiles
We use platform2 now w/gyp, so don't need these anymore.

BUG=chromium:337753
TEST=`FEATURES=test emerge-x86-alex platform2` still passes

Change-Id: I677b646dd56342be5cd98cb57852cc62c805240b
Reviewed-on: https://chromium-review.googlesource.com/185561
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-02-08 23:50:29 +00:00
Mike Frysinger
a557c1187f update to libbase-242728
BUG=chromium:331128
TEST=`FEATURES=test emerge-x86-alex platform2` works
TEST=`cbuildbot chromiumos-sdk` works
CQ-DEPEND=CL:185131

Change-Id: Ia03a6ea7aaf6b4ee5d9c512ebf7080c0c28920f1
Reviewed-on: https://chromium-review.googlesource.com/185150
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-02-07 11:45:42 +00:00
Mike Frysinger
01ca40d690 convert list_proxies to base::CommandLine
We need libbase already, so use that for command line processing rather
than gflags.

BUG=None
TEST=`FEATURES=test emerge-x86-alex platform2` builds & runs crash tests
TEST=`list_proxies --help` works
TEST=ran other list_proxies commands and checked results

Change-Id: I569fa88edb8fee4d6920965d644f69a0998a3202
Reviewed-on: https://chromium-review.googlesource.com/184627
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-02-04 23:04:53 +00:00
Mike Frysinger
1646eb87cb add platform2 support
BUG=chromium:337753
TEST=`FEATURES=test emerge-x86-alex platform2` builds & runs crash tests
TEST=`cbuildbot chromiumos-sdk` passes

Change-Id: Ia1f98b6058ff615ffc862955934096531c5d237d
Reviewed-on: https://chromium-review.googlesource.com/183661
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2014-02-03 01:01:41 +00:00
Ben Chan
8563d20e10 Replace deprecated scoped_array<T> with scoped_ptr<T[]>
BUG=chromium:338610
TEST=Build and run unit tests.

Change-Id: I782cd5ddb0a112a51fca1972faba47b9ed2f7690
Reviewed-on: https://chromium-review.googlesource.com/184069
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2014-01-28 19:59:08 +00:00
Mike Frysinger
83ce73eac5 remove unused gflags includes
These files don't use gflags, so drop the includes.

BUG=chromium:337753
TEST=`FEATURES=test emerge-x86-alex crash-reporter` passes

Change-Id: I0a57e45cd16cd37b1361858e3313d59dced4eb5e
Reviewed-on: https://chromium-review.googlesource.com/183644
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2014-01-25 07:09:53 +00:00
Luigi Semenzato
a59b3df60a Append function name/offset to kernel warning signature.
The current crash reporter signature for a kernel warning
is the 8-digit hex hash for the warning.  For convenience,
add the function name + offset to the hash, when it is
available.

BUG=chromium:328948
TEST=ran unit test

Change-Id: I8f047497c0556227a1dbdf650dabcd4c51aa8340
Reviewed-on: https://chromium-review.googlesource.com/180320
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
2013-12-17 01:32:09 +00:00
Mike Frysinger
f4c39b09f4 crash_sender: upload oldest crashes first
The current logic is sorting crashes by date (which is good), except it
sorts it such that the newest is first (which is bad).

This means if a new process continues to crash, old crash reports will
be perpetually stalled (it's a stack).  Instead, let's start with the
oldest first (like a fifo).

BUG=chromium:326583
TEST=`cbuildbot x86-generic-full` passes VMTests

Change-Id: Ifadedba80cb8c602c094c91d419e4d9645abda51
Reviewed-on: https://chromium-review.googlesource.com/179210
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-12-07 10:20:00 +00:00
Mike Frysinger
9f3bf88120 warn_collector: fix building with newer flex
Flex before 2.5.37 would call YY_INPUT with a result of type int*.
But now it passes result as a yy_size_t* which leaders to errors:

lex.yy.c:1419:3: error: passing 'yy_size_t *' (aka 'unsigned int *') to
	parameter of type 'int *' converts between pointers to integer types
	with different sign

Change the type to match the newer flex.  This means we'll fail when
built with older versions, but we don't care about that.

BUG=chromium:219621
TEST=`emerge-x86-alex crash-reporter` works w/flex-2.5.37
TEST=`emerge-stumpy crash-reporter` works w/flex-2.5.37
CQ-DEPEND=CL:176183

Change-Id: I64e7fdf43af50b7a8aa65125c6a83b9c77ea6ae6
Reviewed-on: https://chromium-review.googlesource.com/176248
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-11-13 07:07:49 +00:00
Albert Chaulk
130265e4bf Copy in new common.mk
BUG=chromium:304400
TEST=cros_run_unit_tests for daisy-drm, lumpy & amd64-corei7

Change-Id: I51a97881aace3cfd5b182f92bf3083a35ff56e72
Reviewed-on: https://chromium-review.googlesource.com/174053
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2013-10-26 00:29:02 +00:00
Ben Chan
62b0c42baf crash-reporter: Remove unused constants reported by clang.
BUG=chromium:309859
TEST=`FEATURES=test USE=clang emerge-lumpy crash-reporter`

Change-Id: Ie6f78ad420322f44ce0c108cb23de299981f60a4
Reviewed-on: https://chromium-review.googlesource.com/173937
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
2013-10-22 23:17:45 +00:00
Mike Frysinger
d2db5ff988 crash_reporter: clarify chrome crash ignore message
We ignore Chrome crashes when it is the kernel that runs us.  When Chrome
itself runs us, we will take their crashes.  The log output here though
has long confused developers, so rephrase it slightly.

BUG=None
TEST=`cros_run_unit_tests -p crash-reporter --board x86-alex` passes
TEST=`cbuildbot {amd64,x86}-generic-full` passes (VMTests)

Change-Id: Ia13a766134f5a20a1cc4eaab74ac46633d3177eb
Reviewed-on: https://chromium-review.googlesource.com/172261
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-10-09 13:56:20 +00:00
Aaron Gable
d9cd84277f Rewrite git/gerrit/gerrit-int urls to googlesource
BUG=chromium:281665,chromium:290413

TEST=None

Change-Id: I114bcb152e1bf1823ee49134e0f7f51719b21944
Reviewed-on: https://chromium-review.googlesource.com/171253
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-10-01 03:39:40 +00:00
Mike Frysinger
a569da0a2f build: respect CFLAGS when building warn_collector.l
We update common.mk to the latest (not really needed, by might as well).

Then we fix the lex building so it uses CFLAGS.  This in turn triggers a
clang warning in the file which we fix by adding proper printf attributes.

BUG=chromium:297661
TEST=`VERBOSE=1 emerge-x86-alex crash-reporter` showed flags used w/lex

Change-Id: I8db4b8b54b2ca748bb400ec6541287fa764f6d43
Reviewed-on: https://chromium-review.googlesource.com/170351
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-09-26 19:12:56 +00:00
Mike Frysinger
55a515c311 crash_sender: use more random tmpdir
The POSIX spec often requires 6 X's in temp paths.  Change the code
to use that rather than the non-standard 4.

BUG=chromium:275910
TEST=`cbuildbot {arm,amd64,x86}-generic-full` works
TEST=`crash_sender` on board works

Change-Id: I97f5959afcb9f60dfd379d517904d5bbf5c502e3
Reviewed-on: https://chromium-review.googlesource.com/169680
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2013-09-17 21:22:09 +00:00
Mike Frysinger
8a17bb928a crash_sender: add support for command line options
This lets us pass in custom env var settings w/out manipulating the
environment.  This makes execution a bit simpler in some cases.

BUG=chromium:275910
TEST=`cbuildbot {arm,amd64,x86}-generic-full` works
TEST=`crash_sender` on board works

Change-Id: Icc32d7a179fee6a2e28d105d5790b2c55f12158b
Reviewed-on: https://chromium-review.googlesource.com/169571
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-09-16 23:31:41 +00:00