Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log crash keys and other info when DumpWithoutCrashing is called.
This CL should slightly improve development experience when debugging scenarios where a DumpWithoutCrashing is called when running a test, or when manually trying to repro a bug with a developer build of Chromium. This CL logs the same information as LOG(FATAL) would (stack trace, task trace, crash keys). This CL has been opportunistically put together when working on https://crbug.com/1038996, but it should be useful in general. This CL does *not* fix https://crbug.com/1038996. Example of how test output might look like when it (accidentally/unexpectedly in this case) triggers a renderer kill: [838194:838194:0826/140420.024770:ERROR:bad_message.cc(20)] Terminating extension renderer for bad IPC message, reason 21 [838194:838194:0826/140420.024971:ERROR:process_posix.cc(337)] Unable to terminate process 838300: Resource temporarily unavailable (11) [838194:838194:0826/140420.158002:ERROR:dump_without_crashing.cc(74)] DumpWithoutCrashing: #0 0x7f678a4593e2 base::debug::CollectStackTrace() #1 0x7f678a34d5d3 base::debug::StackTrace::StackTrace() #2 0x7f678a36b533 logging::LogMessage::AppendCrashInfoForDevBuilds() #3 0x7f678a34cdae (anonymous namespace)::MaybeLogThatDumpWithoutCrashingHappened() #4 0x7f678a34cf2b base::debug::DumpWithoutCrashing() #5 0x7f6782feddc6 content::RenderProcessHostImpl::ShutdownForBadMessage() #6 0x5645447dc5c4 extensions::bad_message::ReceivedBadMessage() #7 0x5645448fd588 extensions::MessagingAPIMessageFilter::OnOpenChannelToExtension() #8 0x5645448fcfa7 IPC::MessageT<>::Dispatch<>() #9 0x5645448fccc0 extensions::MessagingAPIMessageFilter::OnMessageReceived() #10 0x7f678254ccd5 content::BrowserMessageFilter::Internal::DispatchMessage() ... Task trace: #0 0x7f678254ca73 content::BrowserMessageFilter::Internal::OnMessageReceived() #1 0x7f6789a8adce mojo::SimpleWatcher::Context::Notify() Crash keys: "RPH.BadMessageKill-isolation_mode" = "spp " "killed_process_origin_lock" = "{ chrome-extension://mbbkmcnhalmicnfjpiigcennjnmlcdja/ }" "extension_bad_message_reason" = "21" "ExternalConnectionInfo-source_url" = "chrome-extension://mbbkmcnhalmicnfjpiigcennjnmlcdja/background.js" "ExternalConnectionInfo-source_origin" = "nullptr" "MessagingSource-extension_id" = "mbbkmcnhalmicnfjpiigcennjnmlcdja" "MessagingSource-type" = "Extension" "ExternalConnectionInfo-target_id" = "mbbkmcnhalmicnfjpiigcennjnmlcdja" "ui_scheduler_async_stack" = "0x7F678254CA73 0x7F6789A8ADCE" "io_scheduler_async_stack" = "0x7F6789A8ADCE 0x0" Bug: 1038996 Change-Id: I2172212a42b43f9272ecc86904aeb2ddb3c3b936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3857528 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/main@{#1040542}
- Loading branch information