Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e3b76d8 authored by Daniel Erat's avatar Daniel Erat Committed by ChromeOS Commit Bot
Browse files

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: default avatarDan Erat <derat@chromium.org>
Reviewed-by: default avatarMike Frysinger <vapier@chromium.org>
Reviewed-by: default avatarChris Masone <cmasone@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
parent 8f5546ad
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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