crash-reporter: Add session_manager logs to Chrome crashes.

Attach the last twenty session_manager messages from
/var/log/messages to Chrome crash reports.

BUG=chromium:233833
TEST=manual: triggered a crash and checked chrome.txt in the
     crash report (1f8c6ff259947e7a)

Change-Id: I733b448ccc6e01111556a5a632e185cc58dfd917
Reviewed-on: https://chromium-review.googlesource.com/243378
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
This commit is contained in:
Daniel Erat 2015-01-26 18:03:30 -07:00 committed by ChromeOS Commit Bot
parent 8f5546adf9
commit 7e3b76d81f
1 changed files with 5 additions and 3 deletions

View File

@ -14,15 +14,17 @@
# occurred and we should avoid running anything that might cause
# another crash. Similarly these command block the notification of
# the crash to parent processes, so commands should execute quickly.
#
# Commands cannot contain colons.
update_engine:cat $(ls -1tr /var/log/update_engine | tail -5 | sed s.^./var/log/update_engine/.) | tail -c 50000
# The cros_installer output is logged into the update engine log file,
# so it is handled in the same way as update_engine.
cros_installer:cat $(ls -1tr /var/log/update_engine | tail -5 | sed s.^./var/log/update_engine/.) | tail -c 50000
# Dump the last 20 lines of the last two files in Chrome's system and user log
# directories.
chrome:for f in $(ls -1rt /var/log/chrome/chrome_[0-9]* | tail -2) $(ls -1rt /home/chronos/u-*/log/chrome_[0-9]* 2>/dev/null | tail -2); do echo "===$f (tail)==="; tail -20 $f; echo EOF; done
# directories, along with the last 20 messages from the session manager.
chrome:for f in $(ls -1rt /var/log/chrome/chrome_[0-9]* | tail -2) $(ls -1rt /home/chronos/u-*/log/chrome_[0-9]* 2>/dev/null | tail -2); do echo "===$f (tail)==="; tail -20 $f; echo EOF; echo; done; echo "===session_manager (tail)==="; awk '$3 ~ "^session_manager\[" { print }' /var/log/messages | tail -20; echo EOF
# The following rule is used for generating additional diagnostics when
# collection of user crashes fails. This output should not be too large