Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: session_manager_setup.sh

Issue 998009: Add override to enable local minidumps (Closed)
Patch Set: Fix core dumps location in echo Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: session_manager_setup.sh
diff --git a/session_manager_setup.sh b/session_manager_setup.sh
index 7ff0e3f5ff007d92d06858b4f43d36f955689869..28abac87545bccae61d4d3bf33e3c022bb13df86 100644
--- a/session_manager_setup.sh
+++ b/session_manager_setup.sh
@@ -28,6 +28,20 @@ export DISPLAY=:0.0
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11
export GTK_IM_MODULE=ibus
+# Forces Chrome mini dumps that are sent to the crash server to also be written
+# locally. Chrome by default will create these mini dump files in
+# ~/.config/google-chrome/Crash Reports/
+if [ -f /mnt/stateful_partition/etc/enable_chromium_minidumps ] ; then
+ export CHROME_HEADLESS=1
+ # If possible we would like to have the crash reports located somewhere else
+ if [ ! -f ~/.config/google-chrome/Crash\ Reports ] ; then
+ mkdir -p /mnt/stateful_partition/var/minidumps/
+ chown chronos /mnt/stateful_partition/var/minidumps/
+ ln -s /mnt/stateful_partition/var/minidumps/ \
+ ~/.config/google-chrome/Crash\ Reports
+ fi
+fi
+
XAUTH_FILE=${DATA_DIR}/.Xauthority
export XAUTHORITY=${XAUTH_FILE}
@@ -67,12 +81,12 @@ fi
# Enables gathering of chrome dumps. In stateful partition so testers
# can enable getting core dumps after build time.
if [ -f /mnt/stateful_partition/etc/enable_chromium_coredumps ] ; then
- mkdir -p /mnt/stateful_partition/var/crash/
+ mkdir -p /mnt/stateful_partition/var/coredumps/
# Chrome runs and chronos so we need to change the permissions of this folder
# so it can write there when it crashes
- chown chronos /mnt/stateful_partition/var/crash/
+ chown chronos /mnt/stateful_partition/var/coredumps/
ulimit -c unlimited
- echo "/mnt/stateful_partition/var/crash/core.%e.%p" > \
+ echo "/mnt/stateful_partition/var/coredumps/core.%e.%p" > \
/proc/sys/kernel/core_pattern
fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698