Bug 56818 - deadlock from OCommonEmbeddedObject::changeState
Summary: deadlock from OCommonEmbeddedObject::changeState
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:3.7.0 target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-06 20:51 UTC by Michael Stahl (allotropia)
Modified: 2016-09-13 02:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2012-11-06 20:51:00 UTC
master revision 0d26b10ab6776e741d5744079e5ceb2226ffd1c0

observed following deadlock while running sfx2_complex.

thread 4011 wants to paint embedded object while thread 4163 has incoming UNO API call on same embedded object

OCommonEmbeddedObject::changeState locks m_aMutex, other one is SolarMutex.

does not appear to be easy to fix as i dont know embedded object code.


Threads not waiting for a lock:
   Thread 4019  
   Thread 4099  
   Thread 4100  
   Thread 4160  
   Thread 4161  
   Thread 4198  

Mutex 0x1d2fa30:
*  Owned by thread 4011  
   Thread 4163  

Mutex 0x63f24f0:
   Owned by thread 4163  
*  Thread 4011  


Thread 8 (Thread 0x2ac2601e4700 (LWP 4019)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:218
#1  0x00002ac24f1b2ca2 in rtl_cache_wsupdate_wait (seconds=10) at /sal/rtl/source/alloc_cache.cxx:1397
#2  0x00002ac24f1b2e84 in rtl_cache_wsupdate_all (arg=0xa) at /sal/rtl/source/alloc_cache.cxx:1537
#3  0x0000003365c07d14 in start_thread (arg=0x2ac2601e4700) at pthread_create.c:309
#4  0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 7 (Thread 0x2ac26226f700 (LWP 4099)):
#0  0x00000033658f237d in accept () at ../sysdeps/unix/syscall-template.S:82
#1  0x00002ac24f199c53 in osl_acceptPipe (pPipe=0x28d6290) at /sal/osl/unx/pipe.c:467
#2  0x00002ac24f486df4 in osl::Pipe::accept (this=0x1e59c48, Connection=...) at /solver/unxlngx6/inc/osl/pipe.hxx:141
#3  0x00002ac24f48463e in desktop::OfficeIPCThread::execute (this=0x1e59c20) at /desktop/source/app/officeipcthread.cxx:649
#4  0x00002ac2505b1a48 in salhelper::Thread::run (this=0x1e59c20) at /salhelper/source/thread.cxx:60
#5  0x00002ac2505b1e1d in osl::threadFunc (param=0x1e59c30) at /solver/unxlngx6/inc/osl/thread.hxx:196
#6  0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x28d2b90) at /sal/osl/unx/thread.c:261
#7  0x0000003365c07d14 in start_thread (arg=0x2ac26226f700) at pthread_create.c:309
#8  0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 6 (Thread 0x2ac262b27700 (LWP 4100)):
#0  0x00000033658f237d in accept () at ../sysdeps/unix/syscall-template.S:82
#1  0x00002ac24f199c53 in osl_acceptPipe (pPipe=0x54536a0) at /sal/osl/unx/pipe.c:467
#2  0x00002ac26248ba44 in osl::Pipe::accept (this=0x2ac262b26a70, Connection=...) at /solver/unxlngx6/inc/osl/pipe.hxx:141
#3  0x00002ac26248b34c in io_acceptor::PipeAcceptor::accept (this=0x28ffa30) at /io/source/acceptor/acc_pipe.cxx:186
#4  0x00002ac2624944db in io_acceptor::OAcceptor::accept (this=0x28e5cb0, sConnectionDescription="pipe,name=oootest595423da-1241-4516-b7c1-c6979d5b2de4") at /io/source/acceptor/acceptor.cxx:246
#5  0x00002ac2622752e2 in desktop::Acceptor::run (this=0x28e4840) at /desktop/source/offacc/acceptor.cxx:111
#6  0x00002ac262274bac in desktop::workerfunc (acc=0x28e4840) at /desktop/source/offacc/acceptor.cxx:41
#7  0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x28e6ce0) at /sal/osl/unx/thread.c:261
#8  0x0000003365c07d14 in start_thread (arg=0x2ac262b27700) at pthread_create.c:309
#9  0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 5 (Thread 0x2ac264dd3700 (LWP 4160)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00002ac24f1e5e93 in osl_waitCondition (Condition=0x5458d90, pTimeout=0x0) at /sal/osl/unx/conditn.cxx:297
#2  0x00002ac2626bec10 in osl::Condition::wait (this=0x545c8a8, pTimeout=0x0) at /solver/unxlngx6/inc/osl/conditn.hxx:84
#3  0x00002ac2626f597a in binaryurp::Writer::execute (this=0x545c660) at /binaryurp/source/writer.cxx:146
#4  0x00002ac2505b1a48 in salhelper::Thread::run (this=0x545c660) at /salhelper/source/thread.cxx:60
#5  0x00002ac2505b1e1d in osl::threadFunc (param=0x545c670) at /solver/unxlngx6/inc/osl/thread.hxx:196
#6  0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x54593a0) at /sal/osl/unx/thread.c:261
#7  0x0000003365c07d14 in start_thread (arg=0x2ac264dd3700) at pthread_create.c:309
#8  0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 4 (Thread 0x2ac264fd4700 (LWP 4161)):
#0  0x00000033658f2577 in __libc_recv (fd=20, buf=0x63a64d8, n=8, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:34
#1  0x00002ac24f199e60 in osl_receivePipe (pPipe=0x54546c0, pBuffer=0x63a64d8, BytesToRead=8) at /sal/osl/unx/pipe.c:533
#2  0x00002ac24f19a0b3 in osl_readPipe (pPipe=0x54546c0, pBuffer=0x63a64d8, n=8) at /sal/osl/unx/pipe.c:625
#3  0x00002ac26248bb62 in osl::StreamPipe::read (this=0x54444a0, pBuffer=0x63a64d8, n=8) at /solver/unxlngx6/inc/osl/pipe.hxx:191
#4  0x00002ac26248ad66 in io_acceptor::PipeConnection::read (this=0x5444470, aReadBytes=uno::Sequence of length 8 = {...}, nBytesToRead=8) at /io/source/acceptor/acc_pipe.cxx:98
#5  0x00002ac2626ee8d1 in binaryurp::(anonymous namespace)::read (connection=uno::Reference to {
  <com::sun::star::uno::XInterface> = {
    _vptr.XInterface = 0x2ac26269f1b0
  }, <No data fields>}, size=8, eofOk=true) at /binaryurp/source/reader.cxx:72
#6  0x00002ac2626eecfb in binaryurp::Reader::execute (this=0x545ae00) at /binaryurp/source/reader.cxx:108
#7  0x00002ac2505b1a48 in salhelper::Thread::run (this=0x545ae00) at /salhelper/source/thread.cxx:60
#8  0x00002ac2505b1e1d in osl::threadFunc (param=0x545ae10) at /solver/unxlngx6/inc/osl/thread.hxx:196
#9  0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x545cd50) at /sal/osl/unx/thread.c:261
#10 0x0000003365c07d14 in start_thread (arg=0x2ac264fd4700) at pthread_create.c:309
#11 0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x2ac2653de700 (LWP 4163)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x0000003365c09c71 in _L_lock_889 () from /lib64/libpthread.so.0
#2  0x0000003365c09b8a in __pthread_mutex_lock (mutex=0x1d2fa30) at pthread_mutex_lock.c:86
#3  0x00002ac24f1984ee in osl_acquireMutex (Mutex=0x1d2fa30) at /sal/osl/unx/mutex.c:123
#4  0x00002ac2532b657e in vcl::SolarMutexObject::acquire (this=0x1d318b0) at /vcl/source/app/solarmutex.cxx:44
#5  0x00002ac2537d93dc in SalYieldMutex::acquire (this=0x1d318b0) at /vcl/generic/app/geninst.cxx:59
#6  0x00002ac257d850d2 in framework::LockHelper::acquire (this=0x6077880) at /framework/source/fwi/threadhelp/lockhelper.cxx:166
#7  0x00002ac262e77d75 in framework::ResetableGuard::lock (this=0x2ac2653dc850) at /framework/inc/threadhelp/resetableguard.hxx:120
#8  0x00002ac262e77d27 in framework::ResetableGuard::ResetableGuard (this=0x2ac2653dc850, rLock=...) at /framework/inc/threadhelp/resetableguard.hxx:79
#9  0x00002ac263039427 in framework::ToolBarWrapper::dispose (this=0x6077840) at /framework/source/uielement/toolbarwrapper.cxx:107
#10 0x00002ac262ee756e in framework::ToolbarLayoutManager::destroyToolbars (this=0x5f770c0) at /framework/source/layoutmanager/toolbarlayoutmanager.cxx:566
#11 0x00002ac262ed2480 in framework::LayoutManager::implts_destroyElements (this=0x59ced70) at /framework/source/layoutmanager/layoutmanager.cxx:465
#12 0x00002ac262ed7056 in framework::LayoutManager::setDockingAreaAcceptor (this=0x59ced70, xDockingAreaAcceptor=empty uno::Reference) at /framework/source/layoutmanager/layoutmanager.cxx:1361
#13 0x00002ac272211ff4 in DocumentHolder::ShowUI (this=0x65457a0, xContainerLM=uno::Reference to {
  <com::sun::star::uno::XInterface> = {
    _vptr.XInterface = 0x2ac2633c3d90
  }, <No data fields>}, xContainerDP=uno::Reference to {
  <com::sun::star::uno::XInterface> = {
    _vptr.XInterface = 0x2ac2633c8170
  }, <No data fields>}, aContModuleName="com.sun.star.text.TextDocument") at /embeddedobj/source/general/docholder.cxx:732
#14 0x00002ac2721e6b76 in OCommonEmbeddedObject::SwitchStateTo_Impl (this=0x620b9f0, nNextState=4) at /embeddedobj/source/commonembedding/embedobj.cxx:328
#15 0x00002ac2721e78c0 in OCommonEmbeddedObject::changeState (this=0x620b9f0, nNewState=4) at /embeddedobj/source/commonembedding/embedobj.cxx:471
#16 0x00002ac2721e7ef5 in OCommonEmbeddedObject::doVerb (this=0x620b9f0, nVerbID=-1) at /embeddedobj/source/commonembedding/embedobj.cxx:557
#17 0x00002ac260813c96 in gcc3::callVirtualMethod (pThis=0x620b9f0, nVtableIndex=10, pRegisterReturn=0x0, pReturnTypeRef=0x1d3a460, bSimpleReturn=true, pStack=0x2ac2653dd260, nStack=0, pGPR=0x2ac2653dd2d0, nGPR=2, pFPR=0x2ac2653dd300, nFPR=0) at /bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:128
#18 0x00002ac26081b374 in cpp_call (pThis=0x64b3950, aVtableSlot=..., pReturnTypeRef=0x1d3a460, nParams=1, pParams=0x64559b0, pUnoReturn=0x0, pUnoArgs=0x6453710, ppUnoExc=0x2ac2653dd6b8) at /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:246
#19 0x00002ac26081bed8 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch (pUnoI=0x64b3950, pMemberDescr=0x6394700, pReturn=0x0, pArgs=0x6453710, ppException=0x2ac2653dd6b8) at /bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:440
#20 0x00002ac2626d4ad1 in binaryurp::IncomingRequest::execute_throw (this=0x6573700, returnValue=0x2ac2653ddb10, outArguments=0x2ac2653dda80) at /binaryurp/source/incomingrequest.cxx:251
#21 0x00002ac2626d39b7 in binaryurp::IncomingRequest::execute (this=0x6573700) at /binaryurp/source/incomingrequest.cxx:80
#22 0x00002ac2626eeaad in binaryurp::(anonymous namespace)::request (pThreadSpecificData=0x6573700) at /binaryurp/source/reader.cxx:89
#23 0x00002ac24fb9814a in cppu_threadpool::JobQueue::enter (this=0x65737a0, nDisposeId=88480448, bReturnWhenNoJob=1 '\001') at /cppu/source/threadpool/jobqueue.cxx:115
#24 0x00002ac24fb9ba35 in cppu_threadpool::ORequestThread::run (this=0x5461ac0) at /cppu/source/threadpool/thread.cxx:179
#25 0x00002ac24fb9c23f in osl::threadFunc (param=0x5461ad0) at /solver/unxlngx6/inc/osl/thread.hxx:196
#26 0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x54627b0) at /sal/osl/unx/thread.c:261
#27 0x0000003365c07d14 in start_thread (arg=0x2ac2653de700) at pthread_create.c:309
#28 0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x2ac26cfc0700 (LWP 4198)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:166
#1  0x00002ac24f1e5e93 in osl_waitCondition (Condition=0x28ba3d0, pTimeout=0x0) at /sal/osl/unx/conditn.cxx:297
#2  0x00002ac267b82c56 in osl::Condition::wait (this=0x5e06ee0, pTimeout=0x0) at /solver/unxlngx6/inc/osl/conditn.hxx:84
#3  0x00002ac267b7edd7 in GrammarCheckingIterator::DequeueAndCheck (this=0x5e06d20) at /linguistic/source/gciterator.cxx:628
#4  0x00002ac267b7cc7c in workerfunc (gci=0x5e06d20) at /linguistic/source/gciterator.cxx:225
#5  0x00002ac24f1a3283 in osl_thread_start_Impl (pData=0x28b9750) at /sal/osl/unx/thread.c:261
#6  0x0000003365c07d14 in start_thread (arg=0x2ac26cfc0700) at pthread_create.c:309
#7  0x00000033658f167d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x2ac259bb4700 (LWP 4011)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x0000003365c09c71 in _L_lock_889 () from /lib64/libpthread.so.0
#2  0x0000003365c09b8a in __pthread_mutex_lock (mutex=0x63f24f0) at pthread_mutex_lock.c:86
#3  0x00002ac24f1984ee in osl_acquireMutex (Mutex=0x63f24f0) at /sal/osl/unx/mutex.c:123
#4  0x00002ac2721e8e8f in osl::Mutex::acquire (this=0x620ba68) at /solver/unxlngx6/inc/osl/mutex.hxx:67
#5  0x00002ac2721eb700 in osl::Guard<osl::Mutex>::Guard (this=0x7fffc1771f10, t=...) at /solver/unxlngx6/inc/osl/mutex.hxx:153
#6  0x00002ac2721ef856 in OCommonEmbeddedObject::getComponent (this=0x620b9f0) at /embeddedobj/source/commonembedding/miscobj.cxx:497
#7  0x00002ac265ea4122 in SwNoTxtFrm::PaintPicture (this=0x630e500, pOut=0x64914a8, rGrfArea=SwRect = {...}) at /sw/source/core/doc/notxtfrm.cxx:1074
#8  0x00002ac265ea119b in SwNoTxtFrm::Paint (this=0x630e500, rRect=SwRect = {...}) at /sw/source/core/doc/notxtfrm.cxx:321
#9  0x00002ac26611a5e9 in SwLayoutFrm::Paint (this=0x6380980, rRect=SwRect = {...}) at /sw/source/core/layout/paintfrm.cxx:3414
#10 0x00002ac26611d0e9 in SwFlyFrm::Paint (this=0x6380980, rRect=SwRect = {...}) at /sw/source/core/layout/paintfrm.cxx:4101
#11 0x00002ac265f9ac68 in SwVirtFlyDrawObj::wrap_DoPaintObject (this=0x64c9290) at /sw/source/core/draw/dflyobj.cxx:533
#12 0x00002ac265f9a0de in drawinglayer::primitive2d::SwVirtFlyDrawObjPrimitive::get2DDecomposition (this=0x637f4a0, rViewInformation=...) at /sw/source/core/draw/dflyobj.cxx:274
#13 0x00002ac254ff5bc4 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D (this=0x5860c50, rCandidate=...) at /drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:584
#14 0x00002ac254fcb0f1 in drawinglayer::processor2d::BaseProcessor2D::process (this=0x5860c50, rSource=uno::Sequence of length 1 = {...}) at /drawinglayer/source/processor2d/baseprocessor2d.cxx:64
#15 0x00002ac2689812a3 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay (this=0x64c9000, rDisplayInfo=...) at /svx/source/sdr/contact/objectcontactofpageview.cxx:259
#16 0x00002ac2689809a4 in sdr::contact::ObjectContactOfPageView::ProcessDisplay (this=0x64c9000, rDisplayInfo=...) at /svx/source/sdr/contact/objectcontactofpageview.cxx:123
#17 0x00002ac2689cd43a in SdrPageWindow::RedrawLayer (this=0x5ea0670, pId=0x7fffc1772f34 "\001*", pRedirector=0x7fffc1773200) at /svx/source/svdraw/sdrpagewindow.cxx:377
#18 0x00002ac268b532c5 in SdrPageView::DrawLayer (this=0x6329ac0, nID=1 '\001', pGivenTarget=0x64914a8, pRedirector=0x7fffc1773200, rRect=Rectangle = {...}) at /svx/source/svdraw/svdpagv.cxx:386
#19 0x00002ac2664f56d8 in SwViewImp::PaintLayer (this=0x621d050, _nLayerID=1 '\001', pPrintData=0x0, aPaintRect=SwRect = {...}, _pPageBackgrdColor=0x7fffc17731e0, _bIsPageRightToLeft=false, pRedirector=0x7fffc1773200) at /sw/source/core/view/vdraw.cxx:153
#20 0x00002ac2661196ea in SwRootFrm::Paint (this=0x6329530, rRect=SwRect = {...}, pPrintData=0x0) at /sw/source/core/layout/paintfrm.cxx:3157
#21 0x00002ac2664ff767 in ViewShell::Paint (this=0x62da420, rRect=Rectangle = {...}) at /sw/source/core/view/viewsh.cxx:1786
#22 0x00002ac265cd1260 in SwCrsrShell::Paint (this=0x62da420, rRect=Rectangle = {...}) at /sw/source/core/crsr/crsrsh.cxx:1172
#23 0x00002ac2667458c7 in SwEditWin::Paint (this=0x59c5f20, rRect=Rectangle = {...}) at /sw/source/ui/docvw/edtwin2.cxx:535
#24 0x00002ac25379dcca in Window::ImplCallPaint (this=0x59c5f20, pRegion=0x0, nPaintFlags=30) at /vcl/source/window/window.cxx:2464
#25 0x00002ac25379de2c in Window::ImplCallPaint (this=0x628c2d0, pRegion=0x0, nPaintFlags=30) at /vcl/source/window/window.cxx:2488
#26 0x00002ac25379de2c in Window::ImplCallPaint (this=0x6120690, pRegion=0x0, nPaintFlags=30) at /vcl/source/window/window.cxx:2488
#27 0x00002ac25379de2c in Window::ImplCallPaint (this=0x5f35460, pRegion=0x0, nPaintFlags=30) at /vcl/source/window/window.cxx:2488
#28 0x00002ac25379de2c in Window::ImplCallPaint (this=0x6424960, pRegion=0x0, nPaintFlags=30) at /vcl/source/window/window.cxx:2488
#29 0x00002ac25379de2c in Window::ImplCallPaint (this=0x6478fa0, pRegion=0x0, nPaintFlags=8) at /vcl/source/window/window.cxx:2488
#30 0x00002ac25379e03a in Window::ImplCallOverlapPaint (this=0x6478fa0) at /vcl/source/window/window.cxx:2524
#31 0x00002ac25379e18f in Window::ImplHandlePaintHdl (this=0x6478fa0) at /vcl/source/window/window.cxx:2551
#32 0x00002ac25379e0a5 in Window::LinkStubImplHandlePaintHdl (pThis=0x6478fa0, pCaller=0x62f2de0) at /vcl/source/window/window.cxx:2538
#33 0x00002ac2532a30b6 in Link::Call (this=0x62f2e00, pCaller=0x62f2de0) at /solver/unxlngx6/inc/tools/link.hxx:123
#34 0x00002ac2532c5ad5 in Timer::Timeout (this=0x62f2de0) at /vcl/source/app/timer.cxx:245
#35 0x00002ac2532c573e in Timer::ImplTimerCallbackProc () at /vcl/source/app/timer.cxx:133
#36 0x00002ac2601f7ba1 in SalTimer::CallCallback (this=0x2929c10) at /vcl/inc/saltimer.hxx:57
#37 0x00002ac2601f6b40 in SvpSalInstance::CheckTimeout (this=0x1d2cb40, bExecuteTimers=true) at /vcl/headless/svpinst.cxx:171
#38 0x00002ac2601f71bc in SvpSalInstance::Yield (this=0x1d2cb40, bWait=true, bHandleAllCurrentEvents=false) at /vcl/headless/svpinst.cxx:282
#39 0x00002ac2532bb2c4 in ImplYield (i_bWait=true, i_bAllEvents=false) at /vcl/source/app/svapp.cxx:425
#40 0x00002ac2532b76e3 in Application::Yield (i_bAllEvents=false) at /vcl/source/app/svapp.cxx:459
#41 0x00002ac2532b7684 in Application::Execute () at /vcl/source/app/svapp.cxx:404
#42 0x00002ac24f449490 in desktop::Desktop::Main (this=0x7fffc1774450) at /desktop/source/app/app.cxx:1713
#43 0x00002ac2532c28e7 in ImplSVMain () at /vcl/source/app/svmain.cxx:162
#44 0x00002ac2532c2a14 in SVMain () at /vcl/source/app/svmain.cxx:199
#45 0x00002ac24f488b97 in soffice_main () at /desktop/source/app/sofficemain.cxx:83
#46 0x0000000000400948 in sal_main () at /desktop/source/app/main.c:48
#47 0x0000000000400929 in main (argc=9, argv=0x7fffc1774638) at /desktop/source/app/main.c:47
Comment 1 Michael Stahl (allotropia) 2012-11-06 22:12:45 UTC
oh noes, reproducible here and regression from

commit 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70
Author: Michael Meeks <michael.meeks@suse.com>
Date:   Tue Oct 9 12:22:23 2012 +0100

    re-base on ALv2 code. Includes (at least) relevant parts of:

well i guess it's "good" for the AOO project that running the unit tests is against some weird policy then...
Comment 2 Michael Meeks 2012-11-07 09:59:21 UTC
Thanks - I couldn't reproduce this running the tests with no parallelism (and when I'd cleaned up stale locks) - so assumed it was some pre-existing bug we're just triggering - but it's not - shame :-)

Will have a deeper dig; thanks for the trace ! :-)
Comment 3 Stephan Bergmann 2012-11-07 14:20:49 UTC
The deadlock is apparently happening in the call to pOLENd->GetOLEObj().GetOleRef()->getComponent() in SwNoTxtFrm::PaintPicture (sw/source/core/doc/notxtfrm.cxx).  Comparing execution of sfx2_complex before and after 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70, in the "before" case that call is never reached because the condition

  else if( bIsChart
    // Charts must be painted resolution dependent!! #i82893#, #i75867#
    && ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice( pOut )
    && svt::EmbeddedObjectRef::TryRunningState( pOLENd->GetOLEObj().GetOleRef() )
    && ChartPrettyPainter::DoPrettyPaintChart( uno::Reference< frame::XModel >(
        pOLENd->GetOLEObj().GetOleRef()->getComponent(), uno::UNO_QUERY),
        pOut, aAlignedGrfArea.SVRect() ) )

is never executed past the call to ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice (i.e., that always returns false).

In the "after" case, this code has been completely redesigned, and esp. no call to
ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice remains.
Comment 4 Not Assigned 2012-11-07 15:21:49 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=74670bf04e0dc693de6ea060d0dd2c10ee3b184d

fdo#56818 Work around deadlock caused by differing lock orders



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Michael Meeks 2012-11-07 15:35:57 UTC
Wow - thanks so much Stephan - I'd just worked through my TODO to this item, and - it's already fixed :-) very good of you.
Comment 6 Markus Mohrhard 2016-06-23 03:22:29 UTC
Sadly this does not completely fix the problem as there is a call to SolarMutexReleaser in the call chain.

#6  0x00002b24fe142a85 in SolarMutexGuard::SolarMutexGuard (this=0x2b2516b0dfa0) at /home/moggi/devel/libo9/include/vcl/svapp.hxx:1461
#7  0x00002b24fe3ad65d in TransferableHelper::lostOwnership (this=0x46708c0) at /home/moggi/devel/libo9/svtools/source/misc/transfer.cxx:436
#8  0x00002b250045d46f in vcl::GenericClipboard::setContents (this=0x3cba890, xTrans=uno::Reference to (ScSelectionTransferObj *) 0x39b72f8, 
    xClipboardOwner=uno::Reference to (ScSelectionTransferObj *) 0x39b7300) at /home/moggi/devel/libo9/vcl/source/components/dtranscomp.cxx:171
#9  0x00002b24fe3afa48 in TransferableHelper::CopyToSelection (this=0x39b72d0, pWindow=0x37fb000) at /home/moggi/devel/libo9/svtools/source/misc/transfer.cxx:960
#10 0x00002b25184fdd2a in ScTabView::CheckSelectionTransfer (this=0x37f43b0) at /home/moggi/devel/libo9/sc/source/ui/view/tabview3.cxx:367
#11 0x00002b25184fd030 in ScTabView::UpdateAutoFillMark (this=0x37f43b0) at /home/moggi/devel/libo9/sc/source/ui/view/tabview3.cxx:146
#12 0x00002b251840119d in ScColBar::SetMarking (this=0x37fc4a0, bSet=false) at /home/moggi/devel/libo9/sc/source/ui/view/colrowba.cxx:153
#13 0x00002b251846ce63 in ScHeaderControl::StopMarking (this=0x37fc4a0) at /home/moggi/devel/libo9/sc/source/ui/view/hdrcont.cxx:928
#14 0x00002b25184fc5a0 in ScTabView::StopMarking (this=0x37f43b0) at /home/moggi/devel/libo9/sc/source/ui/view/tabview2.cxx:1378
#15 0x00002b2518516d1f in ScTabViewShell::Move (this=0x37f4340) at /home/moggi/devel/libo9/sc/source/ui/view/tabvwsh4.cxx:453
#16 0x00002b251851bd05 in ScTabViewShell::ForceMove (this=0x37f4340) at /home/moggi/devel/libo9/sc/source/ui/inc/tabvwsh.hxx:355
#17 0x00002b2518516893 in ScTabViewShell::OuterResizePixel (this=0x37f4340, rOfs=Point = {...}, rSize=Size = {...}) at /home/moggi/devel/libo9/sc/source/ui/view/tabvwsh4.cxx:387
#18 0x00002b24fc1fe223 in SfxViewFrame::DoAdjustPosSizePixel (this=0x37e88a0, pSh=0x37f4340, rPos=Point = {...}, rSize=Size = {...}) at /home/moggi/devel/libo9/sfx2/source/view/viewfrm.cxx:1573
#19 0x00002b24fc2019c2 in SfxViewFrame::Resize (this=0x37e88a0, bForce=false) at /home/moggi/devel/libo9/sfx2/source/view/viewfrm.cxx:2432
#20 0x00002b24fc209d1f in SfxFrameViewWindow_Impl::Resize (this=0x37f0410) at /home/moggi/devel/libo9/sfx2/source/view/viewfrm2.cxx:74
#21 0x00002b24fff66276 in vcl::Window::ImplCallResize (this=0x37f0410) at /home/moggi/devel/libo9/vcl/source/window/event.cxx:521
#22 0x00002b2500066f0c in vcl::Window::ImplPosSizeWindow (this=0x37f0410, nX=0, nY=24, nWidth=753, nHeight=509, nFlags=PosSizeFlags::PosSize) at /home/moggi/devel/libo9/vcl/source/window/window.cxx:1635
#23 0x00002b250006c364 in vcl::Window::setPosSizePixel (this=0x37f0410, nX=0, nY=24, nWidth=753, nHeight=509, nFlags=PosSizeFlags::PosSize) at /home/moggi/devel/libo9/vcl/source/window/window.cxx:2855
#24 0x00002b25000571ed in vcl::Window::SetPosSizePixel (this=0x37f0410, rNewPos=Point = {...}, rNewSize=Size = {...}) at /home/moggi/devel/libo9/vcl/source/window/window2.cxx:1336
#25 0x00002b24fc1d77d6 in SfxFrame::SetToolSpaceBorderPixel_Impl (this=0x37d91b0, rBorder=...) at /home/moggi/devel/libo9/sfx2/source/view/frame.cxx:774
#26 0x00002b24fbe193e2 in SfxFrameWorkWin_Impl::ArrangeChildren_Impl (this=0x37f0a80, bForce=true) at /home/moggi/devel/libo9/sfx2/source/appl/workwin.cxx:729
#27 0x00002b24fbe18d3e in SfxWorkWindow::Lock_Impl (this=0x37f0a80, bLock=false) at /home/moggi/devel/libo9/sfx2/source/appl/workwin.cxx:595
#28 0x00002b24fbe17abb in LayoutManagerListener::layoutEvent (this=0x37e06e0, eLayoutEvent=1) at /home/moggi/devel/libo9/sfx2/source/appl/workwin.cxx:315
#29 0x00002b2513f97894 in framework::LayoutManager::implts_notifyListeners (this=0x334a620, nEvent=1, rInfoParam=uno::Any("long": 0))
    at /home/moggi/devel/libo9/framework/source/layoutmanager/layoutmanager.cxx:2658
#30 0x00002b2513f95c3b in framework::LayoutManager::unlock (this=0x334a620) at /home/moggi/devel/libo9/framework/source/layoutmanager/layoutmanager.cxx:2284
#31 0x00002b25201efa9a in OCommonEmbeddedObject::SwitchStateTo_Impl (this=0x4147430, nNextState=4) at /home/moggi/devel/libo9/embeddedobj/source/commonembedding/embedobj.cxx:328
#32 0x00002b25201f073d in OCommonEmbeddedObject::changeState (this=0x4147430, nNewState=4) at /home/moggi/devel/libo9/embeddedobj/source/commonembedding/embedobj.cxx:467
#33 0x00002b25201f0d2f in OCommonEmbeddedObject::doVerb (this=0x4147430, nVerbID=0) at /home/moggi/devel/libo9/embeddedobj/source/commonembedding/embedobj.cxx:561

with frame 9 containing the call to SolarMutexReleaser.

I fear I will need to look into this and look for a proper fix.
Comment 7 Commit Notification 2016-07-11 05:30:00 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=54f83fee8451928b7078c0f9c96ec4187309bc00

tdf#56818, use SolarMutex instead of own Mutex

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2016-09-13 02:16:30 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ed7e74ae1c7ecfc29df152a8397fb9f6e1763a60

try to avoid the deadlock around the clipboard, tdf#56818

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.