We see some child process shutdown hangs where the main thread is apparently just waiting to be notified on [`mMainThreadCV`](https://searchfox.org/mozilla-central/rev/d7d5c89ee7bc70dec0fd846689ca030f94931393/xpcom/threads/TaskController.cpp#474). [Example of main thread stack (build id 20220904213226)](https://crash-stats.mozilla.org/report/index/605cdf70-e645-4520-88e3-b4ea10220908) ``` ntdll.dll!NtWaitForAlertByThreadId() Unbekannt ntdll.dll!RtlSleepConditionVariableSRW() Unbekannt KERNELBASE.dll!SleepConditionVariableSRW() Unbekannt mozglue.dll!mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl & lock) Zeile 50 C++ [Inlineframe] xul.dll!mozilla::OffTheBooksCondVar::Wait() Zeile 58 C++ xul.dll!mozilla::TaskController::ProcessPendingMTTask(bool aMayWait) Zeile 474 C++ [Inlineframe] xul.dll!mozilla::TaskController::InitializeInternal::<lambda_2>::operator()() Zeile 190 C++ [Inlineframe] xul.dll!mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:190:7'>::Run() Zeile 531 C++ > xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Zeile 1205 C++ [Inlineframe] xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Zeile 465 C++ xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Zeile 107 C++ [Inlineframe] xul.dll!MessageLoop::RunInternal() Zeile 381 C++ xul.dll!MessageLoop::RunHandler() Zeile 375 C++ xul.dll!MessageLoop::Run() Zeile 357 C++ xul.dll!nsBaseAppShell::Run() Zeile 152 C++ ``` This `TaskController` condvar has been added by bug 1606706. IIUC before that we would have never waited here.
Bug 1789803 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
We see some child process shutdown hangs where the main thread is apparently just waiting to be notified on [`mMainThreadCV`](https://searchfox.org/mozilla-central/rev/d7d5c89ee7bc70dec0fd846689ca030f94931393/xpcom/threads/TaskController.cpp#474). [Example of main thread stack (build id 20220904213226)](https://crash-stats.mozilla.org/report/index/605cdf70-e645-4520-88e3-b4ea10220908) ``` ntdll.dll!NtWaitForAlertByThreadId() Unbekannt ntdll.dll!RtlSleepConditionVariableSRW() Unbekannt KERNELBASE.dll!SleepConditionVariableSRW() Unbekannt mozglue.dll!mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl & lock) Zeile 50 C++ [Inlineframe] xul.dll!mozilla::OffTheBooksCondVar::Wait() Zeile 58 C++ xul.dll!mozilla::TaskController::ProcessPendingMTTask(bool aMayWait) Zeile 474 C++ [Inlineframe] xul.dll!mozilla::TaskController::InitializeInternal::<lambda_2>::operator()() Zeile 190 C++ [Inlineframe] xul.dll!mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:190:7'>::Run() Zeile 531 C++ > xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Zeile 1205 C++ [Inlineframe] xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Zeile 465 C++ xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Zeile 107 C++ [Inlineframe] xul.dll!MessageLoop::RunInternal() Zeile 381 C++ xul.dll!MessageLoop::RunHandler() Zeile 375 C++ xul.dll!MessageLoop::Run() Zeile 357 C++ xul.dll!nsBaseAppShell::Run() Zeile 152 C++ ``` This `TaskController` condvar has been added by bug 1606706. IIUC before that we would have never waited here. Edit: See comment 6.