Closed Bug 1381007 Opened 7 years ago Closed 7 years ago

Firefox hang in the profiler when restarting Windows (profiler extension present but profiling not enabled)

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1374038

People

(Reporter: benjamin, Unassigned)

Details

STR: Firefox nightly 64-bit Start menu -> restart windows Windows shutting-down screen appears, says Firefox is waiting to shut down I press cancel. Firefox is not responsive. I attach a debugger to Firefox. Stack: ntdll.dll!NtWaitForAlertByThreadId() Unknown ntdll.dll!RtlSleepConditionVariableCS() Unknown KernelBase.dll!SleepConditionVariableCS() Unknown mozglue.dll!mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl & lock) Line 58 C++ xul.dll!mozilla::CondVar::Wait(unsigned int aInterval) Line 72 C++ xul.dll!mozilla::ipc::MessageChannel::SynchronouslyClose() Line 2630 C++ xul.dll!mozilla::ipc::MessageChannel::Close() Line 2703 C++ xul.dll!mozilla::ProfilerParentTracker::~ProfilerParentTracker() Line 88 C++ xul.dll!mozilla::UniquePtr<mozilla::ProfilerParentTracker,mozilla::DefaultDelete<mozilla::ProfilerParentTracker> >::reset(mozilla::ProfilerParentTracker * aPtr) Line 343 C++ ucrtbase.dll!_o__execute_onexit_table() Unknown ucrtbase.dll!_register_onexit_function() Unknown ucrtbase.dll!_execute_onexit_table() Unknown xul.dll!dllmain_crt_process_detach(const bool is_terminating) Line 109 C++ xul.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 207 C++ ntdll.dll!LdrpCallInitRoutine() Unknown ntdll.dll!LdrShutdownProcess() Unknown ntdll.dll!RtlExitUserProcess() Unknown kernel32.dll!ExitProcessImplementation() Unknown ucrtbase.dll!exit() Unknown ucrtbase.dll!exit() Unknown > xul.dll!nsWindow::ProcessMessage(unsigned int msg, unsigned __int64 & wParam, __int64 & lParam, __int64 * aRetValue) Line 5146 C++ xul.dll!nsWindow::WindowProcInternal(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 4942 C++ xul.dll!CallWindowProcCrashProtected(__int64(*)(HWND__ *, unsigned int, unsigned __int64, __int64) aWndProc, HWND__ * aHWnd, unsigned int aMsg, unsigned __int64 aWParam, __int64 aLParam) Line 35 C++ xul.dll!nsWindow::WindowProc(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 4895 C++ user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!DispatchClientMessage() Unknown user32.dll!__fnDWORD() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown win32u.dll!NtUserMessageCall() Unknown user32.dll!RealDefWindowProcWorker() Unknown user32.dll!DefWindowProcW() Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!CallWindowProcW() Unknown xul.dll!nsWindow::WindowProcInternal(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 4946 C++ xul.dll!CallWindowProcCrashProtected(__int64(*)(HWND__ *, unsigned int, unsigned __int64, __int64) aWndProc, HWND__ * aHWnd, unsigned int aMsg, unsigned __int64 aWParam, __int64 aLParam) Line 35 C++ xul.dll!nsWindow::WindowProc(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 4895 C++ user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!DispatchClientMessage() Unknown user32.dll!__fnDWORD() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown win32u.dll!NtUserPeekMessage() Unknown user32.dll!PeekMessageW() Unknown xul.dll!mozilla::HangMonitor::IsUIMessageWaiting() Line 360 C++ xul.dll!mozilla::HangMonitor::NotifyActivity(mozilla::HangMonitor::ActivityType aActivityType) Line 376 C++ xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 1396 C++ xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 489 C++ xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Line 126 C++ xul.dll!MessageLoop::RunHandler() Line 314 C++ xul.dll!MessageLoop::Run() Line 294 C++ xul.dll!nsBaseAppShell::Run() Line 158 C++ xul.dll!nsAppShell::Run() Line 273 C++ xul.dll!nsAppStartup::Run() Line 287 C++ xul.dll!XREMain::XRE_mainRun() Line 4595 C++ xul.dll!XREMain::XRE_main(int argc, char * * argv, const mozilla::BootstrapConfig & aConfig) Line 4778 C++ xul.dll!XRE_main(int argc, char * * argv, const mozilla::BootstrapConfig & aConfig) Line 4874 C++ firefox.exe!NS_internal_main(int argc, char * * argv, char * * envp) Line 309 C++ firefox.exe!wmain(int argc, wchar_t * * argv) Line 118 C++ firefox.exe!__scrt_common_main_seh() Line 253 C++ kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown So we are correctly processing the Windows shutdown message in nsWindow::ProcessMessage, doing the abrupt-shutdown path, and calling exit(). Why exit()? I'm not sure, it feels like _exit() or TerminateProcess(GetCurrentProcess()) would be safer. Anyway, exit() calls static destructors via DLL unload hooks, which ends up deleting a mozilla::ProfilerParentTracker via a global UniquePtr (I thought those were disallowed?). Which is then blocking on something forever.
Is this a duplicate of bug 1374038?
Flags: needinfo?(mstange)
Yes it is.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(mstange)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.