New issue
Advanced search Search tips

Issue 676023 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

initramfs: should set up coredumping to save crashes to stateful partition

Project Member Reported by vapier@chromium.org, Dec 20 2016

Issue description

today if a crash happens in a recovery image, the crash is lost and there's no way to get it back out.  would be nice if we initialized the dumping logic to write cores to the stateful partition so we can get them after the fact.

i can't think of a case where this would cause a problem since we're nuking content and not reading stuff from stateful ...
 

Comment 1 by hungte@google.com, Dec 21 2016

I'm probably not the best owner for this since I don't own recovery images, and factory shims have its own way of debuggibg.

Comment 2 by vapier@google.com, Dec 21 2016

I was thinking of having a common default for all 

what is the factory flow now? drop to a console and get stuff by hand?

Comment 3 by hungte@google.com, Dec 25 2016

Currently recovery will put a log of shell debug logs (+x), which is good enough for most of the time... or not?

For factory images, we... 
 (1) add cros_debug to spawn an extra shell for debugging
 (2) if WP=off, scripting (installation) execution error will also spawn a shell to debug

And no, usually we don't need to look at coredump to figure out what goes wrong. The script execution log is enough for factory.

Comment 4 by vapier@chromium.org, Dec 27 2016

i see recovery has save_log_files, but so does factory_shim.  but if you don't care about that, then let's ignore it for now.

how about we:
- in common/init.sh:
  - add an init_coredumps to set an rlimit to something reasonable (let's say 100MB) and have coredumps save to /log/crashes
  - always call that from `initialize`
- in recovery/init, change save_log_files to copy over the coredumps last

do you see a problem with that ?

Comment 5 Deleted

Comment 6 by hungte@chromium.org, Dec 27 2016

Owner: ----
Status: Available (was: Unconfirmed)
I'm ok with adding rlimit, but can I leave it to someone else since my plate is full for all factory stuff :)

Comment 7 Deleted

Comment 8 Deleted

Components: Internals>CrashReporting
Labels: -Pri-2 Pri-3
Components: -Internals>CrashReporting OS>Systems>CrashReporting

Sign in to add a comment