crash-reporter: Collect i915 error state for chrome crashes
Add in the i915 error state as a log file in "chrome" crash reports. "chrome"
isn't normally reported through crash_reporter, so this will only kick in where
a developer has explicitly changed a machine to report them as such.
Because the output can be quite large (as we saw with udev crash reports), the
log is compressed before uploading. Although the file attached to the crash
report will have a ".log" extension, it will actually have been gzip'ed.
BUG=chromium-os:36979
TEST=Tested same config with "sleep" command:
crash/reportdetail?reportid=f429dbcaee7494be
Change-Id: I618a4364dcdd751852a69a79452272b7cf5e61f8
Reviewed-on: https://gerrit.chromium.org/gerrit/39271
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
diff --git a/crash_reporter/crash_reporter_logs.conf b/crash_reporter/crash_reporter_logs.conf
index 70ed258..6f8ad34 100644
--- a/crash_reporter/crash_reporter_logs.conf
+++ b/crash_reporter/crash_reporter_logs.conf
@@ -31,6 +31,15 @@
# run for kernel errors reported through udev events.
crash_reporter-udev-collection-change-card0-drm:for dri in /sys/kernel/debug/dri/*; do echo "===$dri/i915_error_state==="; cat $dri/i915_error_state; done
+# TODO(mkrebs,sabercrombie): Because these can be quite large (600KB
+# compressed), remove this when GPU hangs are no longer an issue, and/or we
+# start collecting "chrome" crashes for normal images.
+# Collect i915 error state for Chrome crashes as well. See
+# crosbug.com/36979. These can be big (i.e. megabytes), so compress them with
+# gzip. Note that the file attached to the crash report will have a ".log"
+# extension, but will have been gzip'ed.
+chrome:for dri in /sys/kernel/debug/dri/*; do echo "===$dri/i915_error_state==="; cat $dri/i915_error_state; done | gzip -c
+
# When trackpad driver cyapa detects some abnormal behavior, we collect
# additional logs from kernel messages.
crash_reporter-udev-collection-change--i2c-cyapa:grep cyapa /var/log/messages