Re: Deadlocking problem related to Win clipboard thread that still exists

2020-12-13 Thread Noel Grandin
On Mon, 14 Dec 2020 at 08:34, Mike Kaganski 
wrote:

>
> I suppose we must check to release solar mutex before any blocking calls
> to clipboard thread, including explicit waits (like
> CMtaOleClipboard::getClipboard that posts a message and then waits) and
> implicit waits like described above, calling COM methods of objects
> known to be created in a different thread.
>
>
Probably that ^^ and also we could post events to the main thread from the
clipboard, rather than directly handling them in the clipboard thread - the
stack trace referenced above looks like it could do that.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Deadlocking problem related to Win clipboard thread that still exists

2020-12-13 Thread Mike Kaganski

Hi!

This is just a FTR after the nice patch 
https://git.libreoffice.org/core/+/9617bc9544cd569066ff187c3672a87fe28fe17f 
from Jan-Marek.


With today's Version: 7.2.0.0.alpha0+ (x64)
Build ID: ed07eff77df5af3b214a3791b4455a743ca35853
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; 
VCL: win

Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

I see this deadlock (which I also saw before that change, so it is not 
any kind of regression from that change).


Main thread:


win32u.dll!NtUserMsgWaitForMultipleObjectsEx() Unknown
user32.dll!RealMsgWaitForMultipleObjectsEx()Unknown
combase.dll!CCliModalLoop::BlockFn(void * * ahEvent, unsigned long cEvents, 
unsigned long * lpdwSignaled) Line 2156 C++
combase.dll!ModalLoop(CSyncClientCall * pClientCall) Line 166   C++
combase.dll!ClassicSTAThreadDispatchCrossApartmentCall(tagRPCOLEMESSAGE * 
pMessage, OXIDEntry * pOXIDEntry, CSyncClientCall * pClientCall) Line 319 
C++
[Inline Frame] 
combase.dll!CSyncClientCall::SwitchAptAndDispatchCall(tagRPCOLEMESSAGE * 
pMessage) Line 5856 C++
combase.dll!CSyncClientCall::SendReceive2(tagRPCOLEMESSAGE * pMessage, unsigned 
long * pstatus) Line 5459   C++
[Inline Frame] 
combase.dll!SyncClientCallRetryContext::SendReceiveWithRetry(tagRPCOLEMESSAGE 
*) Line 1542   C++
[Inline Frame] 
combase.dll!CSyncClientCall::SendReceiveInRetryContext(SyncClientCallRetryContext
 *) Line 565C++
combase.dll!ClassicSTAThreadSendReceive(CSyncClientCall * pClientCall, 
tagRPCOLEMESSAGE * pMsg, unsigned long * pulStatus) Line 547 C++
combase.dll!CSyncClientCall::SendReceive(tagRPCOLEMESSAGE * pMessage, unsigned 
long * pulStatus) Line 783   C++
combase.dll!CClientChannel::SendReceive(tagRPCOLEMESSAGE * pMessage, unsigned 
long * pulStatus) Line 655C++
combase.dll!NdrExtpProxySendReceive(void * pThis, _MIDL_STUB_MESSAGE * 
pStubMsg) Line 2002  C++
rpcrt4.dll!NdrpClientCall3()Unknown
rpcrt4.dll!NdrClientCall3() Unknown
[Inline Frame] combase.dll!IEnumFORMATETC_RemoteNext_Proxy(IEnumFORMATETC *) 
Line 1254  C
combase.dll!IEnumFORMATETC_Next_Proxy(IEnumFORMATETC * This, unsigned long 
celt, tagFORMATETC * rgelt, unsigned long * pceltFetched) Line 1678  C
vclplug_winlo.dll!CDOTransferable::initFlavorList() Line 322C++
vclplug_winlo.dll!CDOTransferable::create(const 
com::sun::star::uno::Reference & rxContext, 
sal::systools::COMReference pIDataObject) Line 219 C++
vclplug_winlo.dll!CWinClipboard::getContents() Line 128 C++
vclplug_winlo.dll!CWinClipboard::ClipboardContentChangedHdl(Timer * __formal) 
Line 264  C++
vclplug_winlo.dll!CWinClipboard::LinkStubClipboardContentChangedHdl(void * 
instance, Timer * data) Line 244 C++
vcllo.dll!Link::Call(Timer * data) Line 111 C++
vcllo.dll!Timer::Invoke() Line 76   C++
vcllo.dll!Scheduler::ProcessTaskScheduling() Line 464   C++
vcllo.dll!Scheduler::CallbackTaskScheduling() Line 267  C++
vcllo.dll!SalTimer::CallCallback() Line 55  C++
vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 164C++
vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 
479   C++
vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents) Line 525C++
vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 444   C++
vcllo.dll!Application::Reschedule(bool i_bAllEvents) Line 458   C++
fwklo.dll!framework::StatusIndicatorFactory::impl_reschedule(bool bForce) Line 
521  C++
fwklo.dll!framework::StatusIndicatorFactory::reset(const 
com::sun::star::uno::Reference & 
xChild) Line 169C++
fwklo.dll!framework::StatusIndicator::reset() Line 80   C++
xolo.dll!ProgressBarHelper::SetValue(long nTempValue) Line 82   C++
xolo.dll!ProgressBarHelper::Increment(long nInc) Line 55C++
xolo.dll!XMLTextImportHelper::CreateTextChildContext(SvXMLImport & rImport, long 
nElement, const 
com::sun::star::uno::Reference & 
xAttrList, XMLTextType eType) Line 1764   C++
swlo.dll!`anonymous namespace'::SwXMLBodyContentContext_Impl::createFastChildContext(long 
nElement, const 
com::sun::star::uno::Reference & 
xAttrList) Line 56   C++
xolo.dll!SvXMLImport::startFastElement(long Element, const 
com::sun::star::uno::Reference & 
Attribs) Line 780   C++
expwraplo.dll!`anonymous namespace'::Entity::startElement(const 
`anonymous-namespace'::Event * pEvent) Line 455 C++
expwraplo.dll!sax_fastparser::FastSaxParserImpl::consume(`anonymous-namespace'::EventList
 & rEventList) Line 996C++
expwraplo.dll!sax_fastparser::FastSaxParserImpl::parseStream(const 
com::sun::star::xml::sax::InputSource & rStructSource) Line 846  C++
expwraplo.dll!sax_fastparser::FastSaxParser::parseStream(const 
com::sun::star::xml::sax::InputSource & aInputSource) Line 1451  C++
xolo.dll!SvXMLImport::parseStream(const com::sun::star::xml::sax::InputSource & 
aInputSource) Line 504  C++
swlo.dll!`anonymous namespace'::ReadThroughComponent(const 
com::sun::star::uno::Reference & xInputStream, const