vcl::Window::dispose deadlock

Stephan Bergmann sbergman at redhat.com
Tue Jun 9 00:58:52 PDT 2015


On Windows, with master as of last night, "make check" happened to run 
into a deadlock in soffice.bin as below.  The main thread is trying to 
re-acquire the SolarMutex (after a SolarMutexReleaser) from within the 
event loop, while an incoming URP thread (apparently holding the 
SolarMutex) does vcl::Window::dispose which, on Windows, blocks on 
sending a message into the event loop.

Where's the bug?


> sal3.dll!osl_acquireMutex(_oslMutexImpl * Mutex) Line 72
> vcllo.dll!osl::Mutex::acquire() Line 56
> vcllo.dll!SalYieldMutex::acquire() Line 140
> vcllo.dll!ImplSalAcquireYieldMutex(unsigned long nCount) Line 299
> vcllo.dll!WinSalInstance::AcquireYieldMutex(unsigned long nCount) Line 586
> vcllo.dll!Application::AcquireSolarMutex(unsigned long nCount) Line 417
> tklo.dll!SolarMutexReleaser::~SolarMutexReleaser() Line 1690
> tklo.dll!VCLXWindowImpl::OnProcessCallbacks(void * __formal) Line 306
> tklo.dll!VCLXWindowImpl::LinkStubOnProcessCallbacks(void * instance, void * data) Line 274
> vcllo.dll!Link<void *,long>::Call(void * data) Line 127
> vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 2026
> vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalFrame * __formal, unsigned short nEvent, const void * pEvent) Line 2578
> vcllo.dll!SalFrame::CallCallback(unsigned short nEvent, const void * pEvent) Line 244
> vcllo.dll!ImplHandleUserEvent(HWND__ * hWnd, long lParam) Line 4128
> vcllo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam, int & rDef) Line 5784
> vcllo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned int wParam, long lParam) Line 5943
> user32.dll!...
> vcllo.dll!ImplSalDispatchMessage(tagMSG * pMsg) Line 597
> vcllo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 613
> vcllo.dll!WinSalInstance::Yield(bool bWait, bool bHandleAllCurrentEvents) Line 669
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 354
> vcllo.dll!Application::Yield() Line 382
> vcllo.dll!Application::Execute() Line 336
> sofficeapp.dll!desktop::Desktop::Main() Line 1607
> vcllo.dll!ImplSVMain() Line 162
> vcllo.dll!SVMain() Line 197
> sofficeapp.dll!soffice_main() Line 96
> soffice.bin!sal_main() Line 48
> soffice.bin!main(int argc, char * * argv) Line 47
> soffice.bin!WinMain(void * _hinst, void * _dummy, char * _cmdline, int _nshow) Line 47
> soffice.bin!__tmainCRTStartup() Line 618
> soffice.bin!WinMainCRTStartup() Line 466

> vcllo.dll!WinSalInstance::DestroyFrame(SalFrame * pFrame) Line 922
> vcllo.dll!vcl::Window::dispose() Line 563
> vcllo.dll!ImplBorderWindow::dispose() Line 1850
> vcllo.dll!OutputDevice::disposeOnce() Line 204
> vcllo.dll!VclPtr<vcl::Window>::disposeAndClear() Line 209
> vcllo.dll!vcl::Window::dispose() Line 548
> vcllo.dll!SystemWindow::dispose() Line 124
> vcllo.dll!FloatingWindow::dispose() Line 235
> vcllo.dll!ImplListBoxFloatingWindow::dispose() Line 2968
> vcllo.dll!OutputDevice::disposeOnce() Line 204
> vcllo.dll!VclPtr<ImplListBoxFloatingWindow>::disposeAndClear() Line 209
> vcllo.dll!ComboBox::dispose() Line 83
> svxcorelo.dll!SvxStyleBox_Impl::dispose() Line 354
> vcllo.dll!OutputDevice::disposeOnce() Line 204
> sfxlo.dll!VclPtr<vcl::Window>::disposeAndClear() Line 209
> sfxlo.dll!SfxToolBoxControl::dispose() Line 286
> svxcorelo.dll!SvxStyleToolBoxControl::dispose() Line 2155
> fwklo.dll!framework::ToolBarManager::RemoveControllers() Line 759
> fwklo.dll!framework::ToolBarManager::dispose() Line 567
> fwklo.dll!framework::ToolBarWrapper::dispose() Line 106
> fwklo.dll!framework::ToolbarLayoutManager::destroyToolbars() Line 655
> fwklo.dll!framework::ToolbarLayoutManager::reset() Line 365
> fwklo.dll!framework::LayoutManager::implts_reset(bool bAttached) Line 410
> fwklo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Line 2800
> fwklo.dll!`anonymous namespace'::Frame::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Line 2856
> fwklo.dll!`anonymous namespace'::Frame::setComponent(const com::sun::star::uno::Reference<com::sun::star::awt::XWindow> & xComponentWindow, const com::sun::star::uno::Reference<com::sun::star::frame::XController> & xController) Line 1530
> fwklo.dll!`anonymous namespace'::Frame::close(unsigned char bDeliverOwnership) Line 1781
> sfxlo.dll!SfxFrame::DoClose() Line 134
> sfxlo.dll!SfxViewFrame::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 1290
> svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 52
> sfxlo.dll!SfxModelListener_Impl::notifyClosing(const com::sun::star::lang::EventObject & __formal) Line 170
> sfxlo.dll!SfxBaseModel::close(unsigned char bDeliverOwnership) Line 1406
> msci_uno.dll!`anonymous namespace'::callVirtualMethod(void * pAdjustedThisPtr, long nVtableIndex, void * pRegisterReturn, _typelib_TypeClass eReturnTypeClass, long * pStackLongs, long nStackLongs) Line 74
> msci_uno.dll!`anonymous namespace'::cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy * pThis, bridges::cpp_uno::shared::VtableSlot aVtableSlot, _typelib_TypeDescriptionReference * pReturnTypeRef, long nParams, _typelib_MethodParameter * pParams, void * pUnoReturn, void * * pUnoArgs, _uno_Any * * ppUnoExc) Line 254
> msci_uno.dll!bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface * pUnoI, const _typelib_TypeDescription * pMemberDescr, void * pReturn, void * * pArgs, _uno_Any * * ppException) Line 435
> binaryurplo.dll!binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny * returnValue, std::vector<binaryurp::BinaryAny,std::allocator<binaryurp::BinaryAny> > * outArguments) Line 241
> binaryurplo.dll!binaryurp::IncomingRequest::execute() Line 73
> binaryurplo.dll!request(void * pThreadSpecificData) Line 83
> cppu3.dll!cppu_threadpool::JobQueue::enter(__int64 nDisposeId, bool bReturnWhenNoJob) Line 115
> cppu3.dll!cppu_threadpool::ORequestThread::run() Line 173
> cppu3.dll!threadFunc(void * param) Line 184
> sal3.dll!oslWorkerWrapperFunction(void * pData) Line 57


More information about the LibreOffice mailing list