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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Currently chrome://crashes reports no crashes due to the switch to using
crash_reporter. This adds reports of all crashes, with the report ID and
product (Chrome or Chrome OS) to Chrome's log.
BUG=chromium:210624
TEST=none
Change-Id: I7e47f6af0374095250830f46b693ac2fa053fa54
Reviewed-on: https://gerrit.chromium.org/gerrit/65886
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
This is to avoid situations when crash_sender is already running
and while test crash reporting, we execute crash_sender manually.
BUG=None
TEST=Manually
Change-Id: I3beea8d503940d7a1af24c8f16eebb365d447434
Reviewed-on: https://gerrit.chromium.org/gerrit/65556
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
When handling chrome crash:
call debugd to write kernel task states into syslog,
parse only the relevant task states out of syslog,
pack them into the log file to be uploaded.
BUG=chromium:244916
TEST=Kill chrome, see the task states in crash log, on Link, Snow and Alex.
Change-Id: Ib8aad79622886581ae5ce50c03097f01db9153a7
Reviewed-on: https://gerrit.chromium.org/gerrit/63205
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
i915_error_state was previously truncated by debugd,
and will be compressed in the future to prevent that.
Because of compression, it will now be received in base64 format,
so to reduce it's size, decode it back.
Also, use xz compression, since it's more compact.
The second compression is a preparation for adding task states to the logs.
BUG=chromium:219121
TEST=Kill chrome, see the log gathered. Uploaded report id 5e5a6f9bf6ff4b5f.
Change-Id: I316cdaef8f8f42d4ac839f7c880960cdf6d7a1e8
Reviewed-on: https://gerrit.chromium.org/gerrit/62568
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Remove references to the low-battery state file formerly
written by powerd. The system shuts down immediately when it
enters the low-battery state.
BUG=chromium:259189
TEST=ran unit tests
Change-Id: I2122210b448af58fb4ecac2c234b9faa9d231e2b
Reviewed-on: https://gerrit.chromium.org/gerrit/62578
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
Since crash_collector runs as chronos for chrome crashes,
it doesn't have permission to read i915_error_state.
Switch to getting it from debugd instead of reading directly.
Also, collect it for all chrome crashes.
BUG=chromium:219121
TEST=Kill chrome, see the log gathered. Uploaded report id 7cbae7f70da9bd3e.
Change-Id: Ic74abea2fc86b16c5a7f0f11df73137d93e5220c
Reviewed-on: https://gerrit.chromium.org/gerrit/61606
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Tested-by: Yuly Novikov <ynovikov@chromium.org>
Adds some logging of parse errors in case there's a format mismatch in future.
Fixes detection of the minidump, was checking the wrong variable.
Modifies crash_sender to properly upload a Chrome dump, including all of the
extra options that get included, and identifies it as a Chrome and not ChromeOS
dump so that it shows up in the right lists server-side.
BUG=chromium:216523
TEST=loaded build of chrome with matching changes, verified about:crash causes
a dump to be created and placed in the right spot, and that it uploads
properly by crash_sender
Change-Id: I8a114ad6798f09f33b78df1680153c0412eabf45
Reviewed-on: https://gerrit.chromium.org/gerrit/59572
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
When computing a hash of a kernel warning message, we include the
trailing newline character. Document this fact, to make it easier
to write separate tools that compute the hash.
BUG=none
TEST=cros_workon_make --board=link --test --reconf crash-reporter
Change-Id: I5d78235db5c8bff7e3639c9d1cd3915d343f471e
Reviewed-on: https://gerrit.chromium.org/gerrit/60797
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
The timestamp in the kernel message can have either "+" or "-"
sign. We want to match both of them.
BUG=chromium:226186
TEST=Make sure the script can capture message starting with
"2013-06-19T20:38:58.663410+00:00 localhost kernel: ["
Change-Id: I93647d4fc8b3d796166d2e959b24364de4bc60c5
Reviewed-on: https://gerrit.chromium.org/gerrit/59297
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
This adds the support that when Pixel touchscreen/trackpad driver
atmel_mxt_ts is misbehaving, e.g. failed to update firmware, failed
to read messages from the chip, trigger crash reporter to send system
logging message for further debugging.
We also follow the policy that, for atmel/cypress logs, we only fetch
the last 30s of the logs.
BUG=chromium:226186
TEST=1. On Pixel, replace the touchscreen firmware file
/opt/google/touch/firmware/162.0_1.1.170.bin
with an empty file with the same name
2. Force touchscreen firmware update
/opt/google/touch/scripts/chromeos-touch-firmware-update.sh -d atmel_mxt_ts -f -n maxtouch-ts.fw
3. After the firmware update fails, check crash report exists at
/var/spool/crash/change__i2c_atmel_mxt_ts.XXX
4. Check that the log contains only 30s of entries with "atmel" keyword.
Change-Id: If46a575491378405e60ad1ccbd39026ae6bf2033
Reviewed-on: https://gerrit.chromium.org/gerrit/48239
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
When invoked from chrome we execute too late to get any of the crashing
process' info as it's already been cleaned up by the kernel. So, require
chrome to pass along the name too
BUG=chromium:216523
TEST=manual invocation of /sbin/crash_reporter, verified supplied name gets
used & it doesn't check /proc for any info
Change-Id: Id74cae3ba93426bd0ac74959741a11baf83c2694
Reviewed-on: https://gerrit.chromium.org/gerrit/58929
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Not sure what has changed, but we're uploading crashes now for test images
when we don't want to. When the channel in /etc/lsb-release is marked as
a test channel (which happens for all test images), exit early.
BUG=chromium:239862
TEST=passed vmtests (logging_CrashSender & logging_UserCrash)
TEST=`cbuildbot {arm,amd64,x86}-generic-full` pass
Change-Id: I4a35aaa34b590c575de639888ed8be68bc9608b6
Reviewed-on: https://gerrit.chromium.org/gerrit/51084
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The recent multiprofile work forgot to append /crash to the user-specific
crash path. It was in the fallback path, but not the dynamic one.
BUG=chromium:248629
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` works
TEST=`cbuildbot x86-generic-full` works
Change-Id: If87848526b0e78f3f76fd412b0f46e37b7022bd6
Reviewed-on: https://gerrit.chromium.org/gerrit/58232
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This fixes a copy-paste error that initialized (twice)
the wrong object.
BUG=chromium:244574
TEST=none
Change-Id: I8ada187483a7b8dbfd8ec19ca284cf08a685844e
Reviewed-on: https://gerrit.chromium.org/gerrit/56845
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Update crash_sender to scan /home/chronos/u-*/crash/ paths since it's
a shell script and there's no easy way to get the right info via shell
commands. We want to scan all paths in case of different ordering.
For crash_collector, update it to use SessionManager's dbus call to
query the active profiles. We select the first one and use that to
process crashes. This should be fine.
We also need to handle the edge case where no user is logged in (yet a
crash occurs with a program running as chronos uid; e.g. the login).
In the past, we just wrote to /home/chronos/user/crash/ even when there
wasn't a user home dir mounted there. With this change, we formalize
(and document) things a bit more by moving to /home/chronos/crash/. We
want this behavior rather than re-using the system path as our tests
specifically verify system vs user crashes.
BUG=chromium:221778
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passes
TEST=logging_UserCrash autotest passes in a vm
CQ-DEPEND=CL:56112
CQ-DEPEND=CL:57067
Change-Id: If9f2ffd0740533537718b2a5e7d215200f5a41d6
Reviewed-on: https://gerrit.chromium.org/gerrit/55600
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
PLOG automatically appends an error message appropriate
for errno, so use it when logging errors after operations
that would set errno meaningfully.
BUG=None
TEST=None
Change-Id: I63549e149bd699469293e5a7f0e48efa9e388162
Reviewed-on: https://gerrit.chromium.org/gerrit/57213
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
The warn_collector_test.c wrapper which calls system() assumes that the
return value of system() is the exit code when it's really a wait status.
That means we'd often get back values like 256 which, when masked with
0377, we get back 0 and so this test would always "pass".
Once we fix that, we see that the script has been failing for all boards
other than link because of hardcoded paths in the setup:
warn_collector: error while loading shared libraries: libmetrics.so:
cannot open shared object file: No such file or directory
Analysis of these vars show that we haven't even been testing the local
compiled binary. Instead, we've been trying to test the one installed
into the $SYSROOT due to the $PATH munging. I cleaned that up as well
as generally tidied up this test script.
Once we fix that, we then see that the collection doesn't work properly
and fails with:
expected 2 lines in warn-test-log, found this:
6c1b181c
This last bug is due to the regex matching less than was expected:
<PRE_WARN>[^ ]+\n if (WarnStart()) { /* yytext is file:line */
But the actual line looks like:
Apr 31 25:25:25 localhost kernel: [117959.231100] WARNING: at /mnt/host/source/src/third_party/kernel/files/drivers/gpu/drm/i915/intel_dp.c:351 intel_dp_check_edp+0x6b/0xb9()
You can see there is a space between the <file> and the <symbol> which
means we pass in to the start function in this (*not* the file:line):
intel_dp_check_edp+0x6b/0xb9()
When the test script runs, it tries to use sed to mung the error message
to get a new file path, but the collector only looks at the func name,
so the calculated hashes continue to match.
We can fix this latter part in two ways: change the test to mung the
func name, or change the lex to pass in the file+func name. I've gone
the latter route as that seems to have been the intention.
BUG=chromium:217382
TEST=`cros_run_unit_tests --board=x86-alex -p crash-reporter` passes
Change-Id: I5b3490c56280bb5260198af930b6744cea585c46
Reviewed-on: https://gerrit.chromium.org/gerrit/56305
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
If we pause the process (standard SIGSTOP/SIGCONT), the read() on the
inotify handle gets angry and aborts. This can happen if you ctrl+z
the program, or if you attach to it with strace. This is undesirable,
so ignore EINTR errors from the read().
BUG=None
TEST=ran `./warn_collector --test` and hit ctrl+z then fg
Change-Id: I49e99abb12ace847e88f973817854d8ba95cf689
Reviewed-on: https://gerrit.chromium.org/gerrit/56303
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Chrome will be modified to pass crashes to crash_reporter via a specially
formatted file, a TLV-style designed to be easily parsed, instead of
multipart/form-data. Extra attributes are added into the .meta file.
BUG=chromium:187808
TEST=new unit tests created
Change-Id: I0d65d118e0e348329d14bb4004c8f7bad5a44a97
Reviewed-on: https://gerrit.chromium.org/gerrit/49972
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
Before this change, the signature of a warning is computed from
a string such as this one:
/mnt/host/source/src/third_party/kernel/files/drivers/gpu/drm/i915/intel_dp.c:351 intel_dp_check_edp+0x6b/0xb9()
This change removes all text after the first space, i.e. the function name
and IP offset. The latter varies across architectures and can vary across
builds, giving different signatures for the same warning.
BUG=chromium:227080
TEST=manual
Change-Id: Ied65dbd8edd734bd152a9dd35aaa48f1e8f1b9e8
Reviewed-on: https://gerrit.chromium.org/gerrit/49505
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
A flex-based daemon collects kernel warnings by parsing /var/log/messages
as lines are added to it. For every warning the daemon sends a sample
to a sparse UMA histogram using a hash of the warning as the bucket.
Then, if the warning hasn't been seen before, the daemon invokes the
crash collector to upload the warning stack trace.
BUG=chromium:217382
TEST=manually tested (for now), automated test on its way
CQ-DEPEND=Ic8d5773d05d717a275c4a4b5616e0e4c307337b8
CQ-DEPEND=I6a4010acad0ffe20c702bb0fc455e3da7cdf3ac1
Change-Id: I89090e5c2b61ec46b4e740f0895c591728d70e77
Reviewed-on: https://gerrit.chromium.org/gerrit/48277
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Fixes a clang error. Also use "base::FilePath" since FilePath has been
moved to the base namespace.
BUG=chromium-os:39046
TEST=The following command passes:
USE="chrome_internal" CFLAGS="-clang -print-cmdline"
CXXFLAGS="-clang -print-cmdline" emerge-x86-alex crash-reporter
Change-Id: I7da82093c5685b5b556cba971b1e1b14ac0f59c4
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43577
Reviewed-by: Ben Chan <benchan@chromium.org>
This makes it work with clang (supposedly).
BUG=chromium-os:37965
TEST=`cros_run_unit_tests --board=stumpy -p crash-reporter` passes
Change-Id: I598df1be7c8a38e14cde5f5328a3b6e2e1532ea7
Reviewed-on: https://gerrit.chromium.org/gerrit/43377
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This update replaces the current common.mk used in this project with the newest
version. This will allow all of the common.mk based projects to be on the same
version for debugging and enables profiling support.
BUG=chromium-os:37854
TEST=Exectuted the following commands to confirm the build works:
MODE=profiling cros_workon_make --board=link
MODE=profiling cros_workon_make --board=link --test
cros_workon_make --board=link
cros_workon_make --board=link --test
Repeated these with emerge-link, USE=profiling, and
FEATURES=test as need.
For the emerge command with profiling and testing enable, confirmed the
appropriate coverage files were created in /usr/share/profiling/...
Change-Id: I12fcd4a590994223ddc42cf22670db82e94f0e03
Reviewed-on: https://gerrit.chromium.org/gerrit/42777
Tested-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>