Hi Team,
I am debugging a bug of WebAudio in Chrome browser: https://issues.chromium.org/issues/40941111. I can trigger the bug with the normal chrome browser; however, when recording with rr debugger, the chrome did not even hit the crash.
I would like to ask if any possible help on this. Please see some of the files and logs below for reproduction.
Commit hash 0c9f675b04752
Chrome issue link https://issues.chromium.org/issues/40941111
Chip Intel Core i5 9th Gen
args.gn
"""
is_debug = true
is_component_build = true
symbol_level = 1
enable_nacl = false
"""
Logs without the rr-debugger:
"""
$ ./chrome --no-sandbox --use-fake-ui-for-media-stream /home/ubuntu/crash-html/web-audio-2023.html
[374158:374158:0113/104828.434054:WARNING:chrome_main_delegate.cc(668)] This is Chrome version 121.0.6121.0 (not a warning)
[374158:374158:0113/104829.224346:ERROR:policy_logger.cc(156)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[374158:374158:0113/104829.287369:WARNING:account_consistency_mode_manager.cc(77)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[374158:374158:0113/104829.723683:ERROR:cookie_controls_icon_view.cc(256)] CookieControl status is not initialized
[374158:374158:0113/104830.338671:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[374189:374189:0113/104831.270381:WARNING:sandbox_linux.cc(400)] InitializeSandbox() called with multiple threads in process gpu-process.
[374158:374158:0113/104832.781232:WARNING:capture_device_ranking.h(80)] Can't rank device infos because media.audio_input.user_preference_ranking isn't registered
[374158:374158:0113/104832.781309:WARNING:capture_device_ranking.h(80)] Can't rank device infos because media.video_input.user_preference_ranking isn't registered
[374158:374158:0113/104832.795464:INFO:CONSOLE(15)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu", source: file:///home/ubuntu/crash-html/web-audio-2023.html (15)
[374158:374158:0113/104832.796737:INFO:CONSOLE(22)] "The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)", source: file:///home/ubuntu/crash-html/web-audio-2023.html (22)
[374158:374158:0113/104832.800104:INFO:CONSOLE(0)] "[AudioContext] Fallback to the default device due to an invalid audio device change. (default)", source: file:///home/ubuntu/crash-html/web-audio-2023.html (0)
[374158:374185:0113/104832.844868:ERROR:platform_thread_linux.cc(295)] Failed to set realtime priority for thread 374272: Operation not permitted (1)
[374158:374158:0113/104832.848994:INFO:CONSOLE(24)] "onaudioprocessing suspended", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374158:374158:0113/104832.852719:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374257:374257:0113/104832.884278:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374257:374257:0113/104832.888870:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374257:374257:0113/104832.895146:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374257:374257:0113/104832.895409:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374158:374158:0113/104832.895918:INFO:CONSOLE(29)] "Uncaught (in promise) InvalidStateError: Cannot resolve pending promise from setSinkId(), AudioContext is going away", source: file:///home/ubuntu/crash-html/web-audio-2023.html (29)
[374158:374158:0113/104832.897022:INFO:CONSOLE(19)] "panner freed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (19)
[374257:374273:0113/104833.022087:WARNING:sync_reader.cc(198)] SyncReader::Read timed out, audio glitch count=10
Received signal 11 SI_KERNEL000000000000
Possibly a General Protection Fault, can be due to a non-canonical address dereference. See "Intel 64 and IA-32 Architectures Software Developer’s Manual", Volume 1, Section 3.3.7.1.
#0 0x74d92bdc132c base::debug::CollectStackTrace()
#1 0x74d92bd717ca base::debug::StackTrace::StackTrace()
#2 0x74d92bd71785 base::debug::StackTrace::StackTrace()
#3 0x74d92bdc0c63 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#4 0x74d8d9a42520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4251f)
#5 0x74d8e5ad3bc8 scoped_refptr<>::operator*()
#6 0x74d8e5ae3e69 blink::AudioHandler::GetDeferredTaskHandler()
#7 0x74d8e5b24ffd blink::AudioNodeOutput::GetDeferredTaskHandler()
#8 0x74d8e5b24707 blink::AudioNodeOutput::Pull()
#9 0x74d8e5b22899 blink::AudioNodeInput::SumAllConnections()
#10 0x74d8e5b22a39 blink::AudioNodeInput::Pull()
#11 0x74d8e5b0332c [374158:374185:0113/104833.139093:ERROR:platform_thread_linux.cc(295)] Failed to set realtime priority for thread 374274: Operation not permitted (1)
[374257:374273:0113/104833.145865:WARNING:sync_reader.cc(198)] SyncReader::Read timed out, audio glitch count=20
blink::AudioHandler::PullInputs()
#12 0x74d8e5b02bd5 blink::AudioHandler::ProcessIfNecessary()
#13 0x74d8e5b2488d blink::AudioNodeOutput::Pull()
#14 0x74d8e5b22899 blink::AudioNodeInput::SumAllConnections()
#15 0x74d8e5b22a39 blink::AudioNodeInput::Pull()
#16 0x74d8e5be82ac blink::RealtimeAudioDestinationHandler::Render()
#17 0x74d8ea22420e blink::AudioDestination::ProvideResamplerInput()
#18 0x74d8ea233bff base::internal::FunctorTraits<>::Invoke<>()
#19 0x74d8ea233b5c base::internal::InvokeHelper<>::MakeItSo<>()
#20 0x74d8ea233add base::internal::Invoker<>::RunImpl<>()
#21 0x74d8ea233a26 base::internal::Invoker<>::Run()
#22 0x74d8ea25f689 base::RepeatingCallback<>::Run()
#23 0x74d8ea25e9f3 WTF::CrossThreadFunction<>::Run()
#24 0x74d8ea25e62f blink::MediaMultiChannelResampler::ProvideResamplerInput()
#25 0x74d8ea25efdf base::internal::FunctorTraits<>::Invoke<>()
#26 0x74d8ea25ef3c base::internal::InvokeHelper<>::MakeItSo<>()
#27 0x74d8ea25eebd base::internal::Invoker<>::RunImpl<>()
#28 0x74d8ea25ee06 base::internal::Invoker<>::Run()
#29 0x74d91aae29d9 base::RepeatingCallback<>::Run()
#30 0x74d91ab60693 media::MultiChannelResampler::ProvideInput()
#31 0x74d91ab63119 base::internal::FunctorTraits<>::Invoke<>()
#32 0x74d91ab6306d base::internal::InvokeHelper<>::MakeItSo<>()
#33 0x74d91ab62fdd base::internal::Invoker<>::RunImpl<>()
#34 0x74d91ab62f16 base::internal::Invoker<>::Run()
#35 0x74d91aba9659 [374257:374273:0113/104833.269329:WARNING:sync_reader.cc(198)] SyncReader::Read timed out, audio glitch count=30
base::RepeatingCallback<>::Run()
#36 0x74d91aba86a6 media::SincResampler::Resample()
#37 0x74d91ab60aed media::MultiChannelResampler::Resample()
#38 0x74d8ea25e7eb blink::MediaMultiChannelResampler::ResampleInternal()
#39 0x74d8ea222274 blink::AudioDestination::RequestRender()
#40 0x74d8ea221918 blink::AudioDestination::Render()
#41 0x74d9252ee685 content::RendererWebAudioDeviceImpl::Render()
#42 0x74d91aba2399 media::SilentSinkSuspender::Render()
#43 0x74d91aa56017 media::AudioOutputDeviceThreadCallback::Process()
#44 0x74d91aa156dd media::AudioDeviceThread::ThreadMain()
#45 0x74d92bd4fe5a base::(anonymous namespace)::ThreadFunc()
#46 0x74d8d9a94ac3 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
#47 0x74d8d9b26850 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x12684f)
r8: 000000000005b602 r9: 000000000005b602 r10: 000074d80fff9518 r11: 0000000000000206
r12: 000074d810000640 r13: 0000000000000000 r14: 000074d8d9a947d0 r15: 000074d8b9df4920
di: 80c04900b4030040 si: 0000000000000000 bp: 000074d80fff8890 bx: 000074d810000640
dx: 0000000000000080 ax: 80c04900b4030040 cx: b29e02de5dc2ec00 sp: 000074d80fff8850
ip: 000074d8e5ad3bc8 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000000
trp: 000000000000000d msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
[374257:374273:0113/104833.392787:WARNING:sync_reader.cc(198)] SyncReader::Read timed out, audio glitch count=40
[374257:374273:0113/104833.468056:WARNING:sync_reader.cc(175)] ASR: No room in socket buffer.: Broken pipe (32)
[374158:374169:0113/104833.479343:WARNING:internal_linux.cc(78)] Failed to read /proc/374214/stat
"""
Log with rr-debugger:
"""
$ rr record -n ./chrome --no-sandbox --use-fake-ui-for-media-stream /home/ubuntu/crash-html/web-audio-2023.html
rr: Saving execution to trace directory `/home/ubuntu/.local/share/rr/chrome-43'.
[374328:374328:0113/105102.411657:WARNING:chrome_main_delegate.cc(668)] This is Chrome version 121.0.6121.0 (not a warning)
[374328:374328:0113/105106.935146:ERROR:policy_logger.cc(156)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[374328:374328:0113/105107.039368:WARNING:account_consistency_mode_manager.cc(77)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[374328:374328:0113/105109.431088:ERROR:cookie_controls_icon_view.cc(256)] CookieControl status is not initialized
[374328:374328:0113/105112.733690:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[374364:374364:0113/105113.738930:WARNING:gpu_memory_buffer_support_x11.cc(36)] Running under rr, disabling dri3
[374364:374364:0113/105113.790926:WARNING:sandbox_linux.cc(400)] InitializeSandbox() called with multiple threads in process gpu-process.
[374328:374347:0113/105115.729140:WARNING:bus.cc(653)] Bus::SendWithReplyAndBlock took 1455ms to process message: type=method_call, path=/org/freedesktop/DBus, interface=org.freedesktop.DBus, member=GetNameOwner
Warning: loader_add_layer_properties: Can not find 'layer' object in manifest JSON file angledata/VkICD_mock_icd.json. Skipping this file.
Warning: terminator_CreateInstance: Failed to CreateInstance in ICD 1. Skipping ICD.
Error: ../src/intel/vulkan/anv_device.c:1222: Unable to open device /dev/dri/renderD128: No such file or directory (VK_ERROR_INCOMPATIBLE_DRIVER)
Error: Assertion failure at ../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:257 (OnDebugUtilsCallback): false
[0113/105312.354552:ERROR:ptracer.cc(605)] ptrace: Input/output error (5)
shared memfd open() failed: Function not implemented
[374328:374328:0113/105507.170909:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=133
[374328:374328:0113/105507.171244:WARNING:gpu_process_host.cc(1362)] The GPU process has crashed 1 time(s)
[374328:374328:0113/105507.365405:WARNING:capture_device_ranking.h(80)] Can't rank device infos because media.audio_input.user_preference_ranking isn't registered
[374328:374328:0113/105507.365864:WARNING:capture_device_ranking.h(80)] Can't rank device infos because media.video_input.user_preference_ranking isn't registered
[374495:374495:0113/105510.066427:WARNING:gpu_memory_buffer_support_x11.cc(36)] Running under rr, disabling dri3
[374495:374495:0113/105510.093471:WARNING:sandbox_linux.cc(400)] InitializeSandbox() called with multiple threads in process gpu-process.
[374328:374328:0113/105510.230168:WARNING:gpu_process_host.cc(1015)] Reinitialized the GPU process after a crash. The reported initialization time was 2542 ms
[374328:374328:0113/105512.428601:INFO:CONSOLE(15)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu", source: file:///home/ubuntu/crash-html/web-audio-2023.html (15)
[374328:374328:0113/105512.435557:INFO:CONSOLE(22)] "The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)", source: file:///home/ubuntu/crash-html/web-audio-2023.html (22)
[374328:374328:0113/105512.926134:INFO:CONSOLE(0)] "[AudioContext] Fallback to the default device due to an invalid audio device change. (default)", source: file:///home/ubuntu/crash-html/web-audio-2023.html (0)
shared memfd open() failed: Function not implemented
[374328:374328:0113/105515.845818:INFO:CONSOLE(24)] "onaudioprocessing suspended", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374328:0113/105515.847983:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374355:0113/105516.352145:WARNING:child_thread_type_switcher_linux.cc(27)] Could not find tid
[374476:374476:0113/105516.607340:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374476:374476:0113/105516.712979:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374328:374328:0113/105516.864814:INFO:CONSOLE(29)] "Uncaught (in promise) InvalidStateError: Cannot resolve pending promise from setSinkId(), AudioContext is going away", source: file:///home/ubuntu/crash-html/web-audio-2023.html (29)
[374328:374328:0113/105516.870676:INFO:CONSOLE(19)] "panner freed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (19)
[374476:374476:0113/105516.912852:INFO:audio_manager_pulse.cc(215)] Not implemented!
[374476:374476:0113/105516.925354:INFO:audio_manager_pulse.cc(215)] Not implemented!
shared memfd open() failed: Function not implemented
[374328:374328:0113/105517.452579:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374355:0113/105517.732525:ERROR:platform_thread_linux.cc(295)] Failed to set realtime priority for thread 374516: Operation not permitted (1)
[374328:374328:0113/105517.849595:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374328:0113/105518.561498:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374328:0113/105519.160571:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
[374328:374328:0113/105519.752365:INFO:CONSOLE(24)] "onaudioprocessing closed", source: file:///home/ubuntu/crash-html/web-audio-2023.html (24)
...
"""
Thanks so much, Christian.
I have tried using chaos mode and different browser options like --no-sandbox and --single-process with both the Chrome and content_shell binaries. Unfortunately, the rr debugger still fails to record the crash.
Do you know the best practices for identifying the Chrome process that causes the crash and debugging that process? The rr debugger looks promising, but I find it quite challenging to implement, and the documentation is not very clear.