Closed Bug 1495457 Opened 6 years ago Closed 1 month ago

browser_dbg_rr_breakpoints-01.js Timeout and Assert Failure

Categories

(Core Graveyard :: Web Replay, defect, P5)

Unspecified
macOS
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: haik, Unassigned)

References

Details

When running the Web Replay test devtools/client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js locally, the test always times out. This is on OS X Mojave with mozilla-central based on the following changeset. MacBook Pro (Retina, 15-inch, Mid 2015). 

  436857:87a95e1b7ec6
  Merge inbound to mozilla-central. a=merge
  
With the same test running on a debug build, I hit a MOZ_ASSERT in CrashReporter::GetChildNotificationPipe() while the main thread is blocked in mozilla::recordreplay::parent::ChildProcessInfo::LaunchSubprocess().
    
Crashing thread:

  (lldb) bt
  * thread #4, name = 'Chrome_~dThread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    * frame #0 XUL`CrashReporter::GetChildNotificationPipe() at nsExceptionHandler.cpp:3450
      frame #1 XUL`mozilla::ipc::GeckoChildProcessHost::PerformAsyncLaunch() at GeckoChildProcessHost.cpp:774
      frame #2 XUL`mozilla::ipc::GeckoChildProcessHost::RunPerformAsyncLaunch() at GeckoChildProcessHost.cpp:489
      frame #3 XUL`mozilla::detail::RunnableMethodArguments<std::__1::vector<std... at nsThreadUtils.h:1178
      frame #4 XUL`_ZN7mozilla6detail23RunnableMethodArgumentsIJNSt3__16vectorINS... at nsThreadUtils.h:1229
      frame #6 XUL`MessageLoop::RunTask() at message_loop.cc:451
      frame #7 XUL`MessageLoop::DeferOrRunPendingTask() at message_loop.cc:459
      frame #8 XUL`MessageLoop::DoWork() at message_loop.cc:534
      frame #9 XUL`base::MessagePumpLibevent::Run() at message_pump_libevent.cc:352
      frame #10 XUL`MessageLoop::RunInternal() at message_loop.cc:325
      frame #11 XUL`MessageLoop::RunHandler() at message_loop.cc:318
      frame #12 XUL`MessageLoop::Run() at message_loop.cc:298
      frame #13 XUL`base::Thread::ThreadMain() at thread.cc:181
      frame #14 XUL`ThreadFunc() at platform_thread_posix.cc:44
      frame #15 libsystem_pthread.dylib`_pthread_body() 
      frame #16 libsystem_pthread.dylib`_pthread_start() 
      frame #17 libsystem_pthread.dylib`thread_start()
    
All threads:

  (lldb) bt all
    thread #1, queue = 'com.apple.main-thread'
      frame #0 libsystem_kernel.dylib`__psynch_cvwait() 
      frame #1 libsystem_pthread.dylib`_pthread_cond_wait() 
      frame #2 libmozglue.dylib`mozilla::detail::ConditionVariableImpl::wait() at ConditionVariable_posix.cpp:118
      frame #3 libmozglue.dylib`mozilla::detail::ConditionVariableImpl::wait_for() at ConditionVariable_posix.cpp:127
      frame #4 XUL`mozilla::OffTheBooksCondVar::Wait() at BlockingResourceBase.cpp:611
      frame #5 XUL`mozilla::OffTheBooksCondVar::Wait() at BlockingResourceBase.cpp:593
      frame #6 XUL`mozilla::Monitor::Wait() at Monitor.h:39
      frame #7 XUL`mozilla::MonitorAutoLock::Wait() at Monitor.h:85
      frame #8 XUL`mozilla::ipc::GeckoChildProcessHost::LaunchAndWaitForProcessHandle() at GeckoChildProcessHost.cpp:405
      frame #9 XUL`mozilla::recordreplay::parent::ChildProcessInfo::LaunchSubprocess() at ChildProcess.cpp:508
      frame #10 XUL`mozilla::recordreplay::parent::ChildProcessInfo::ChildProcessInfo() at ChildProcess.cpp:59
      frame #11 XUL`mozilla::recordreplay::parent::ChildProcessInfo::ChildProcessInfo() at ChildProcess.cpp:47
      frame #12 XUL`mozilla::recordreplay::parent::SpawnRecordingChild() at ParentIPC.cpp:554
      frame #13 XUL`mozilla::recordreplay::parent::InitializeMiddleman() at ParentIPC.cpp:901
      frame #14 XUL`mozilla::dom::ContentProcess::Init() at ContentProcess.cpp:285
      frame #15 XUL`XRE_InitChildProcess() at nsEmbedFunctions.cpp:744
      frame #16 XUL`mozilla::BootstrapImpl::XRE_InitChildProcess() at Bootstrap.cpp:69
      frame #17 plugin-container`content_process_main() at plugin-container.cpp:50
      frame #18 plugin-container`main() at MozillaRuntimeMain.cpp:25
      frame #19 libdyld.dylib`start() 
    thread #2
      frame #0 libsystem_kernel.dylib`__workq_kernreturn() 
      frame #1 libsystem_pthread.dylib`_pthread_wqthread() 
      frame #2 libsystem_pthread.dylib`start_wqthread() 
    thread #3
      frame #0 libsystem_kernel.dylib`mach_msg_trap() 
      frame #1 libsystem_kernel.dylib`mach_msg() 
      frame #2 XUL`google_breakpad::ExceptionHandler::WaitForMessage() at exception_handler.cc:494
      frame #3 libsystem_pthread.dylib`_pthread_body() 
      frame #4 libsystem_pthread.dylib`_pthread_start() 
      frame #5 libsystem_pthread.dylib`thread_start() 
  * thread #4, name = 'Chrome_~dThread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    * frame #0 XUL`CrashReporter::GetChildNotificationPipe() at nsExceptionHandler.cpp:3450
      frame #1 XUL`mozilla::ipc::GeckoChildProcessHost::PerformAsyncLaunch() at GeckoChildProcessHost.cpp:774
      frame #2 XUL`mozilla::ipc::GeckoChildProcessHost::RunPerformAsyncLaunch() at GeckoChildProcessHost.cpp:489
      frame #3 XUL`mozilla::detail::RunnableMethodArguments<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::applyImpl<mozilla::ipc::GeckoChildProcessHost, bool (mozilla::ipc::GeckoChildProcessHost::*)(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >), StoreCopyPassByConstLRef<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, 0ul>() at nsThreadUtils.h:1178
      frame #4 XUL`_ZN7mozilla6detail23RunnableMethodArgumentsIJNSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEEEE5applyINS_3ipc21GeckoChildProcessHostEMSF_FbSB_EEEDTcl9applyImplfp_fp0_dtdefpT10mArgumentstlNS2_16integer_sequenceImJLm0EEEEEEEPT_T0_() at nsThreadUtils.h:1184
      frame #5 XUL`mozilla::detail::RunnableMethodImpl<mozilla::ipc::GeckoChildProcessHost*, bool (mozilla::ipc::GeckoChildProcessHost::*)(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >), false, (mozilla::RunnableKind)0, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::Run() at nsThreadUtils.h:1229
      frame #6 XUL`MessageLoop::RunTask() at message_loop.cc:451
      frame #7 XUL`MessageLoop::DeferOrRunPendingTask() at message_loop.cc:459
      frame #8 XUL`MessageLoop::DoWork() at message_loop.cc:534
      frame #9 XUL`base::MessagePumpLibevent::Run() at message_pump_libevent.cc:352
      frame #10 XUL`MessageLoop::RunInternal() at message_loop.cc:325
      frame #11 XUL`MessageLoop::RunHandler() at message_loop.cc:318
      frame #12 XUL`MessageLoop::Run() at message_loop.cc:298
      frame #13 XUL`base::Thread::ThreadMain() at thread.cc:181
      frame #14 XUL`ThreadFunc() at platform_thread_posix.cc:44
      frame #15 libsystem_pthread.dylib`_pthread_body() 
      frame #16 libsystem_pthread.dylib`_pthread_start() 
      frame #17 libsystem_pthread.dylib`thread_start() 
    thread #5
      frame #0 libsystem_kernel.dylib`mach_msg_trap() 
      frame #1 libsystem_kernel.dylib`mach_msg() 
      frame #2 XUL`ReceivePort::WaitForMessage() at mach_ipc_mac.mm:268
      frame #3 XUL`mozilla::ipc::PortServerThread() at SharedMemoryBasic_mach.mm:379
      frame #4 libsystem_pthread.dylib`_pthread_body() 
      frame #5 libsystem_pthread.dylib`_pthread_start() 
      frame #6 libsystem_pthread.dylib`thread_start() 
    thread #6
      frame #0 libsystem_kernel.dylib`__accept() 
      frame #1 XUL`mozilla::recordreplay::Channel::ThreadMain() at Channel.cpp:123
      frame #2 libsystem_pthread.dylib`_pthread_body() 
      frame #3 libsystem_pthread.dylib`_pthread_start() 
      frame #4 libsystem_pthread.dylib`thread_start()
See Also: → 1485566
Summary: browser_dbg_rr_breakpoints-01.js Assert Failure → browser_dbg_rr_breakpoints-01.js Timeout and Assert Failure
The MOZ_ASSERT(OOPInitialized()) crash is hit because OOPInitialized() is implemented as return (pidToMinidump != nullptr) and pidToMinidump is not set. pidToMinidump is not set because, if we are the middle man process, in OOPInit() we bail out before setting pidToMinidump after calling MaybeForwardCrashesIfMiddleman().
See Also: → 1495574
Component: Debugger → Web Replay
Product: DevTools → Core
I think this is the same issue as bug 1495574: the middleman's child recording process crashed on startup, and the middleman hangs while waiting for it to become responsive.
This is also reproducible on 10.13.6 for me.
Priority: -- → P5
Product: Core → Core Graveyard
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.