Closed Bug 1442523 Opened 2 years ago Closed 2 years ago

Deadlock on content process with a11y

Categories

(Core :: Disability Access APIs, defect)

x86_64
Windows
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected
firefox60 --- fixed

People

(Reporter: m_kato, Assigned: Jamie)

References

Details

(Keywords: hang, regression)

Attachments

(1 file)

I don't know root cause when this occurs.  When I use ATOK (that IME uses a11y API), content process sometimes deadlock.  Gecko's main thread is waiting for lock...

0:052> ~0k
Child-SP          RetAddr           Call Site
00000024`ee1fdb48 00007ffe`bfe1c18f ntdll!NtWaitForAlertByThreadId+0x14
00000024`ee1fdb50 00007ffe`bfe1bf5b ntdll!RtlpWaitOnAddressWithTimeout+0x43
00000024`ee1fdb80 00007ffe`bfdf0c49 ntdll!RtlpWaitOnCriticalSection+0x15f
00000024`ee1fdc30 00007ffe`bfdf0b60 ntdll!RtlpEnterCriticalSectionContended+0xd9
00000024`ee1fdc60 00007ffe`7844ee8a ntdll!RtlEnterCriticalSection+0x40
(Inline Function) --------`-------- xul!mozilla::OffTheBooksMutex::Lock+0x9
(Inline Function) --------`-------- xul!mozilla::BaseAutoLock<mozilla::Mutex>::{ctor}+0x9
00000024`ee1fdc90 00007ffe`78450765 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0xee
00000024`ee1fdd20 00007ffe`bf6ef628 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0x9d
00000024`ee1fdd50 00007ffe`7844dfe0 combase!CoDisconnectObject+0x68
00000024`ee1fdd80 00007ffe`79c0d325 xul!mozilla::mscom::Interceptor::DisconnectRemotesForTarget+0x90
00000024`ee1fddb0 00007ffe`79c4821a xul!mozilla::a11y::AccessibleWrap::Shutdown+0x69
00000024`ee1fdde0 00007ffe`79c483ff xul!mozilla::a11y::DocAccessible::Shutdown+0x1d2
00000024`ee1fde40 00007ffe`79c1e1fd xul!mozilla::a11y::RootAccessible::Shutdown+0x13
00000024`ee1fde70 00007ffe`775874de xul!mozilla::a11y::DocManager::HandleEvent+0xd1
00000024`ee1fdf70 00007ffe`775895cf xul!mozilla::EventListenerManager::HandleEventSubType+0xbe
00000024`ee1fe1b0 00007ffe`77588c83 xul!mozilla::EventListenerManager::HandleEventInternal+0x57f
(Inline Function) --------`-------- xul!mozilla::EventListenerManager::HandleEvent+0xa4
(Inline Function) --------`-------- xul!mozilla::EventTargetChainItem::HandleEvent+0x5f7
00000024`ee1fe480 00007ffe`7761beda xul!mozilla::EventTargetChainItem::HandleEventTargetChain+0x703
00000024`ee1fe500 00007ffe`77510180 xul!mozilla::EventDispatcher::Dispatch+0x82a
00000024`ee1fe770 00007ffe`777d1498 xul!mozilla::EventDispatcher::DispatchDOMEve
nt+0x8c
00000024`ee1fe7c0 00007ffe`7768505b xul!nsDocument::DispatchPageTransition+0xbc
00000024`ee1fe810 00007ffe`7757c6d3 xul!nsDocument::OnPageHide+0x11f
00000024`ee1fe890 00007ffe`7757c45b xul!nsDocumentViewer::PageHide+0x77
00000024`ee1fe9a0 00007ffe`7804f567 xul!nsDocShell::FirePageHideNotificationInternal+0x6f
00000024`ee1fea60 00007ffe`79bf78a4 xul!nsDocShell::FirePageHideNotification+0x13
00000024`ee1fea90 00007ffe`79bf8a56 xul!nsDocShell::RestoreFromHistory+0x1f0
00000024`ee1fec20 00007ffe`780853eb xul!nsDocShell::RestorePresentationEvent::Run+0x12
00000024`ee1fec50 00007ffe`774aa90d xul!mozilla::SchedulerGroup::Runnable::Run+0x5f
00000024`ee1fecb0 00007ffe`7774facd xul!nsThread::ProcessNextEvent+0x49d
(Inline Function) --------`-------- xul!NS_ProcessNextEvent+0x16
00000024`ee1ff330 00007ffe`78293e70 xul!mozilla::ipc::MessagePump::Run+0x91
00000024`ee1ff380 00007ffe`779f1327 xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x70
00000024`ee1ff3b0 00007ffe`779f12d6 xul!MessageLoop::RunHandler+0x1b
00000024`ee1ff3e0 00007ffe`779f1af4 xul!MessageLoop::Run+0x3e
00000024`ee1ff430 00007ffe`779f17ec xul!nsBaseAppShell::Run+0x3c
00000024`ee1ff460 00007ffe`79d91867 xul!nsAppShell::Run+0x30
00000024`ee1ff490 00007ffe`78293e29 xul!XRE_RunAppShell+0x3b
00000024`ee1ff4c0 00007ffe`779f1327 xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x29
00000024`ee1ff4f0 00007ffe`779f12d6 xul!MessageLoop::RunHandler+0x1b
00000024`ee1ff520 00007ffe`79d9167e xul!MessageLoop::Run+0x3e
00000024`ee1ff570 00007ff7`8436a887 xul!XRE_InitChildProcess+0x682
00000024`ee1ff7b0 00007ff7`84367141 firefox!content_process_main+0x9f
00000024`ee1ff7f0 00007ff7`843612a1 firefox!NS_internal_main+0x5a01
00000024`ee1ffbf0 00007ff7`84365c29 firefox!wmain+0x201
(Inline Function) --------`-------- firefox!invoke_main+0x22
00000024`ee1ffc40 00007ffe`befb1fe4 firefox!__scrt_common_main_seh+0x11d
00000024`ee1ffc80 00007ffe`bfe3efc1 KERNEL32!BaseThreadInitThunk+0x14
00000024`ee1ffcb0 00000000`00000000 ntdll!RtlUserThreadStart+0x21


0:000> dt xul!CRITICAL_SECTION 00000154`f7ae18f8
   +0x000 DebugInfo        : 0x00000154`81bc7f40 _RTL_CRITICAL_SECTION_DEBUG
   +0x008 LockCount        : 0n-6
   +0x00c RecursionCount   : 0n1
   +0x010 OwningThread     : 0x00000000`00003694 Void
   +0x018 LockSemaphore    : 0xffffffff`ffffffff Void
   +0x020 SpinCount        : 0x5dc
   

  23  Id: 7a8.3694 Suspend: 1 Teb: 00000024`edfd6000 Unfrozen
Child-SP          RetAddr           Call Site
(Inline Function) --------`-------- xul!mozilla::mscom::SpinEvent::Wait+0x4b
(Inline Function) --------`-------- xul!`anonymous-namespace'::SyncRunnable::WaitUntilComplete+0x4b
00000024`f17fd5f0 00007ffe`7844ecfb xul!mozilla::mscom::MainThreadInvoker::Invoke+0x14e
00000024`f17fd640 00007ffe`7844e3db xul!mozilla::mscom::Interceptor::QueryInterfaceTarget+0x63
00000024`f17fd6b0 00007ffe`7844eff0 xul!mozilla::mscom::Interceptor::GetInterceptorForIID+0x12b
00000024`f17fd780 00007ffe`78450765 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0x254
00000024`f17fd810 00007ffe`bf6b498e xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0x9d
(Inline Function) --------`-------- combase!IUnknown::QueryInterface+0xb1
00000024`f17fd840 00007ffe`bf6c06a2 combase!CarefullyQueryNewInterface+0xde
(Inline Function) --------`-------- combase!CarefullyQueryNewInterface+0x1b
00000024`f17fd980 00007ffe`bf6fb9f6 combase!CStdIdentity::CStdIdentity+0x2a2
00000024`f17fda90 00007ffe`bf6fb91b combase!GetStdId+0x7a
00000024`f17fdb30 00007ffe`7845186e combase!CoGetStdMarshalEx+0xdb
00000024`f17fdb80 00007ffe`78454837 xul!mozilla::mscom::FastMarshaler::FastMarshaler+0x72
00000024`f17fdbb0 00007ffe`7844eebb xul!mozilla::mscom::FastMarshaler::Create+0x43
00000024`f17fdbe0 00007ffe`78450765 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0x11f
00000024`f17fdc70 00007ffe`bf6b90e2 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0x9d
(Inline Function) --------`-------- combase!CDestObjectWrapper::GetMarshalSizeMax+0x6c
00000024`f17fdca0 00007ffe`bf70a9a1 combase!CoGetMarshalSizeMax+0x1e2
00000024`f17fdd70 00007ffe`bf453883 combase!WdtpInterfacePointer_UserSize+0x41
00000024`f17fddb0 00007ffe`bfa2732b OLEAUT32!CStubUniv::Release+0x6253
00000024`f17fddf0 00007ffe`bfa726d5 RPCRT4!NdrUserMarshalBufferSize+0x12b
00000024`f17fde60 00007ffe`bfa72adf RPCRT4!NdrpComplexArrayBufferSize+0x4d5
00000024`f17fdf00 00007ffe`bfa78e1f RPCRT4!NdrComplexArrayBufferSize+0xef
00000024`f17fdf50 00007ffe`bf6edcdd RPCRT4!NdrStubCall2+0x95f
00000024`f17fe5f0 00007ffe`bf431c20 combase!CStdStubBuffer_Invoke+0xbd
00000024`f17fe630 00007ffe`bf6a31b3 OLEAUT32!CStubWrapper::Invoke+0x90
(Inline Function) --------`-------- combase!InvokeStubWithExceptionPolicyAndTracing::__l6::<lambda_76d9e92c799d246a4afbe64a2bf5673d>::operator()+0x2b
00000024`f17fe670 00007ffe`bf6a14b2 combase!ObjectMethodExceptionHandlingAction<<lambda_76d9e92c799d246a4afbe64a2bf5673d> >+0x53
(Inline Function) --------`-------- combase!InvokeStubWithExceptionPolicyAndTracing+0xd9
00000024`f17fe6d0 00007ffe`bf6a3ea2 combase!DefaultStubInvoke+0x2d2
(Inline Function) --------`-------- combase!SyncStubCall::Invoke+0x2c
(Inline Function) --------`-------- combase!SyncServerCall::StubInvoke+0x2c
(Inline Function) --------`-------- combase!StubInvoke+0x2b9
00000024`f17fe850 00007ffe`bf69d8df combase!ServerCall::ContextInvoke+0x492
(Inline Function) --------`-------- combase!CServerChannel::ContextInvoke+0x84
(Inline Function) --------`-------- combase!DefaultInvokeInApartment+0x9d
00000024`f17fec70 00007ffe`bf69e66b combase!AppInvoke+0x2ff
00000024`f17fed70 00007ffe`bf6a27ea combase!ComInvokeWithLockAndIPID+0x55b
00000024`f17ff000 00007ffe`bfa473b4 combase!ThreadInvoke+0xefa
00000024`f17ff2c0 00007ffe`bfa4654e RPCRT4!DispatchToStubInCNoAvrf+0x24
00000024`f17ff310 00007ffe`bfa46f84 RPCRT4!RPC_INTERFACE::DispatchToStubWorker+0x1be
00000024`f17ff3e0 00007ffe`bfa506a3 RPCRT4!RPC_INTERFACE::DispatchToStubWithObject+0x154
00000024`f17ff480 00007ffe`bfa513a6 RPCRT4!LRPC_SCALL::DispatchRequest+0x183
00000024`f17ff560 00007ffe`bfa4d12e RPCRT4!LRPC_SCALL::HandleRequest+0x996
00000024`f17ff670 00007ffe`bfa4e853 RPCRT4!LRPC_ADDRESS::HandleRequest+0x34e
00000024`f17ff720 00007ffe`bfa7cc68 RPCRT4!LRPC_ADDRESS::ProcessIO+0x8a3
00000024`f17ff860 00007ffe`bfe065ce RPCRT4!LrpcIoComplete+0xd8
00000024`f17ff900 00007ffe`bfe04b46 ntdll!TppAlpcpExecuteCallback+0x22e
00000024`f17ff980 00007ffe`befb1fe4 ntdll!TppWorkerThread+0x886
00000024`f17ffd10 00007ffe`bfe3efc1 KERNEL32!BaseThreadInitThunk+0x14
00000024`f17ffd40 00000000`00000000 ntdll!RtlUserThreadStart+0x21
Summary: Deadlock → Deadlock on content process with a11y
Env is the latest Nightly
OS: Unspecified → Windows
Hardware: Unspecified → x86_64
Ug. Regression introduced by bug 1434822.

VFO just reported the same deadlock. Marco is also seeing a hang which I suspect is the same deadlock.
Assignee: nobody → jteh
Blocks: 1434822
Keywords: hang, regression
I've requested that bug 1434822 be backed out for now until I can figure this out.
Jamie, in case this helps at all, a way for me to regularly see this freeze is when freshly loading a Slack workspace in a new tab, e. g. after a Nightly update with several Slack workspaces open, and switching to one that hasn't already been loaded via CTRL+Tab. The freeze I saw earlier today, and also the ones when I saw them in the try build last week, happened while it was freshly loading a Slack workspace and then displaying the last visited channel of that workspace.

Here's an NVDA debug log from a working (Firefox 59 Beta latest) switch I just performed.

IO - inputCore.InputManager.executeGesture (08:56:30.492):
Input: kb(laptop):control+tab
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:30.569):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
IO - braille.BrailleBuffer.update (08:56:30.726):
Braille regions text: [u'\xfc2 Channels ']
IO - braille.BrailleHandler.update (08:56:30.726):
Braille window dots: 12568 126 - 147 125 1 1345 1345 15 123 234 -
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:30.773):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUG - treeInterceptorHandler.update (08:56:30.944):
Adding new treeInterceptor to runningTable: <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x07290E70>
DEBUG - virtualBuffers.VirtualBuffer._loadBuffer (08:56:30.960):
Buffer load took 0.016 sec, 0 chars
DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:30.976):
Thread 10144, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::getTextInRange, 896:
Bad offsets of 0 and 1, returning NULL

IO - speech.speak (08:56:31.069):
Speaking [LangChangeCommand ('de_DE'), u'Besch\xe4ftigt']
DEBUG - queueHandler.registerGeneratorObject (08:56:31.069):
Adding generator 215
DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:31.069):
Thread 10144, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::getLineOffsets, 999:
Offset of 0 too big for buffer, returning false

IO - braille.BrailleBuffer.update (08:56:31.069):
Braille regions text: [u'jteh | Mozilla Slack - Mozilla Firefox ', u'Besch\xe4ftigt Dok ', ' ']
IO - braille.BrailleHandler.update (08:56:31.069):
Braille window dots: -
IO - braille.BrailleHandler.update (08:56:31.069):
Braille window dots: -
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:31.117):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:31.516):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:31.559):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
IO - braille.BrailleBuffer.update (08:56:33.233):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Besch\xe4ftigt Dok ', ' ']
IO - braille.BrailleHandler.update (08:56:33.233):
Braille window dots: -
IO - braille.BrailleBuffer.update (08:56:33.328):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Besch\xe4ftigt Dok ', ' ']
IO - braille.BrailleHandler.update (08:56:33.328):
Braille window dots: -
DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:33.546):
Thread 10144, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::getLineOffsets, 999:
Offset of 0 too big for buffer, returning false

IO - braille.BrailleBuffer.update (08:56:33.546):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Besch\xe4ftigt Dok ', ' ']
IO - braille.BrailleHandler.update (08:56:33.546):
Braille window dots: -
DEBUG - treeInterceptorHandler.killTreeInterceptor (08:56:34.217):
Killed treeInterceptor: <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x07290E70>
DEBUG - treeInterceptorHandler.update (08:56:34.217):
Adding new treeInterceptor to runningTable: <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x07290810>
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:34.312):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:34.328):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:34.328):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:34.328):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUG - virtualBuffers.VirtualBuffer._loadBuffer (08:56:34.342):
Buffer load took 0.125 sec, 396 chars
IO - speech.speak (08:56:34.421):
Speaking [LangChangeCommand ('de_DE'), u'Besch\xe4ftigt']
IO - speech.speak (08:56:34.437):
Speaking [LangChangeCommand ('de_DE'), u'Firefox DevTools Slack  Besch\xe4ftigt']
DEBUG - queueHandler.registerGeneratorObject (08:56:34.437):
Adding generator 216
IO - braille.BrailleBuffer.update (08:56:34.453):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Firefox DevTools Slack Besch\xe4ftigt Dok ', u'lnk Gibt es Schwierigkeiten? Starte den Selbsthilfetest. ']
IO - braille.BrailleHandler.update (08:56:34.453):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
IO - braille.BrailleHandler.update (08:56:34.453):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
IO - speech.speak (08:56:34.500):
Speaking [IndexCommand(1), LangChangeCommand ('de_DE'), u'Link', u'Gibt es Schwierigkeiten? Starte den Selbsthilfetest.']
IO - braille.BrailleBuffer.update (08:56:34.608):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Firefox DevTools Slack Besch\xe4ftigt Dok ', u'lnk Gibt es Schwierigkeiten? Starte den Selbsthilfetest. ']
IO - braille.BrailleHandler.update (08:56:34.608):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
IO - braille.BrailleBuffer.update (08:56:34.655):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Firefox DevTools Slack Besch\xe4ftigt Dok ', u'lnk Gibt es Schwierigkeiten? Starte den Selbsthilfetest. ']
IO - braille.BrailleHandler.update (08:56:34.655):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
IO - speech.speak (08:56:34.671):
Speaking [IndexCommand(2), LangChangeCommand ('de_DE'), u'Wenn du Fragen zur Benutzung von Slack hast, kannst du sie in einer Direktnachricht an Slackbot ', IndexCommand(3), u'stellen. ']
IO - speech.speak (08:56:34.720):
Speaking [IndexCommand(4), LangChangeCommand ('de_DE'), u'\u2013 Deine Freunde von Slack']
IO - speech.speak (08:56:34.736):
Speaking [IndexCommand(5), LangChangeCommand ('de_DE'), u'Team-Men\xfc Sprungmarke Navigation ', u'\xdcberschrift  Ebene 1', u'Team-Men\xfc']
IO - speech.speak (08:56:34.750):
Speaking [IndexCommand(6), LangChangeCommand ('de_DE'), u'Men\xfc-Schaltfl\xe4che  Untermen\xfc', u'Team-Men\xfc']
IO - speech.speak (08:56:34.783):
Speaking [IndexCommand(7), LangChangeCommand ('de_DE'), u'Firefox DevTools', IndexCommand(8), u'Schalter', u'Benachrichtigungsmen\xfc']
IO - speech.speak (08:56:34.831):
Speaking [IndexCommand(9), IndexCommand(10), LangChangeCommand ('de_DE'), u'Verbindung wird aufgebaut ...']
IO - speech.speak (08:56:34.851):
Speaking [IndexCommand(11), LangChangeCommand ('de_DE'), u'Channel-Header Sprungmarke Banner ', u'\xdcberschrift  Ebene 1', u'Channel-Header']
IO - speech.speak (08:56:34.878):
Speaking [IndexCommand(12), LangChangeCommand ('de_DE'), u' Sprungmarke Suche ', u'Anklickbar', u'Suchfunktion  Eingabefeld  reduziert  Untermen\xfc  mit AutoVervollst\xe4ndigung  Mehrzeilig  Anklickbar', u'Eingabefeld Ende']
IO - speech.speak (08:56:34.907):
Speaking [IndexCommand(13), LangChangeCommand ('de_DE'), u'Schalter', u'Aktivit\xe4t anzeigen']
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:36.746):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:36.753):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:36.759):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:36.766):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
IO - speech.speak (08:56:36.769):
Speaking [LangChangeCommand ('de_DE'), u'Channel #console ']
IO - braille.BrailleBuffer.update (08:56:37.563):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Firefox DevTools Slack Besch\xe4ftigt Dok ', u'lnk Gibt es Schwierigkeiten? Starte den Selbsthilfetest. ']
IO - braille.BrailleHandler.update (08:56:37.563):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
IO - braille.BrailleBuffer.update (08:56:37.563):
Braille regions text: [u'Firefox DevTools Slack - Mozilla Firefox ', u'Firefox DevTools Slack Besch\xe4ftigt Dok ', u'lnk Gibt es Schwierigkeiten? Starte den Selbsthilfetest. ']
IO - braille.BrailleHandler.update (08:56:37.563):
Braille window dots: 123 1345 13 - 12457 24 12 2345 - 15 234 - 2347 14 125 2456 24 15 1235 24 1245 13 15 24 2345 15 1345 26 - 2347 2345 1 1235 2345 15 - 145 15 1345 -
DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:38.407):
Thread 12476, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::insertNode, 420:
Cannot insert a NULL node. Returning false

DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:38.417):
Thread 12476, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::replaceSubtrees, 643:
Error inserting node. Skipping

DEBUGWARNING - RPC process 3508 (firefox.exe) (08:56:38.427):
Thread 12476, build\x86_64\vbufBase\backend.cpp, VBufBackend_t::update, 210:
Error replacing one or more subtrees

ERROR - eventHandler.executeEvent (08:56:38.854):
error executing event: gainFocus on <NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionEditorMozillaIAccessible object at 0x07739EB0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 152, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "C:\Users\marco\AppData\Roaming\nvda\addons\wintenApps\globalPlugins\wintenObjs.py", line 166, in event_gainFocus
  File "eventHandler.pyc", line 100, in next
  File "C:\Users\marco\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient\__init__.py", line 365, in event_gainFocus
  File "eventHandler.pyc", line 100, in next
  File "C:\Users\marco\AppData\Roaming\nvda\addons\easyTableNavigator\globalPlugins\easyTableNavigator.py", line 82, in event_gainFocus
  File "eventHandler.pyc", line 100, in next
  File "appModules\firefox.pyc", line 24, in event_stateChange
  File "eventHandler.pyc", line 100, in next
  File "browseMode.pyc", line 1420, in event_gainFocus
  File "treeInterceptorHandler.pyc", line 119, in _set_passThrough
  File "review.pyc", line 120, in setCurrentMode
  File "api.pyc", line 195, in setReviewPosition
  File "braille.pyc", line 1858, in handleReviewMove
  File "braille.pyc", line 1734, in _doNewObject
  File "braille.pyc", line 1470, in getFocusRegions
  File "braille.pyc", line 936, in update
  File "braille.pyc", line 791, in _addTextWithFields
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 340, in getTextWithFields
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 289, in _getText
AttributeError: 'NoneType' object has no attribute 'obj'
DEBUGWARNING - NVDAObjects.IAccessible.IA2TextTextInfo._getCaretOffset (08:56:39.322):
IAccessibleText::caretOffset failed
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 151, in _getCaretOffset
COMError: (-2147220995, 'Objekt ist nicht mit dem Server verbunden.', (None, None, None, 0, None))
ERROR - eventHandler.executeEvent (08:56:39.362):
error executing event: caret on <NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionEditorMozillaIAccessible object at 0x07739EB0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 152, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "browseMode.pyc", line 1173, in event_caret
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\behaviors.pyc", line 173, in event_caret
  File "NVDAObjects\IAccessible\__init__.pyc", line 1365, in event_caret
  File "NVDAObjects\__init__.pyc", line 1000, in event_caret
  File "braille.pyc", line 1769, in handleCaretMove
  File "braille.pyc", line 1734, in _doNewObject
  File "braille.pyc", line 1470, in getFocusRegions
  File "braille.pyc", line 936, in update
  File "braille.pyc", line 791, in _addTextWithFields
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 340, in getTextWithFields
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 289, in _getText
AttributeError: 'NoneType' object has no attribute 'obj'
DEBUGWARNING - NVDAObjects.IAccessible.IA2TextTextInfo._getCaretOffset (08:56:39.677):
IAccessibleText::caretOffset failed
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 151, in _getCaretOffset
COMError: (-2147220995, 'Objekt ist nicht mit dem Server verbunden.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:39.710):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
IO - speech.speak (08:56:39.950):
Speaking [LangChangeCommand ('de_DE'), u'console | Firefox DevTools Slack - Mozilla Firefox']
IO - speech.speak (08:56:39.992):
Speaking [LangChangeCommand ('de_DE'), u'console | Firefox DevTools Slack - Mozilla Firefox']
IO - speech.speak (08:56:39.993):
Speaking [LangChangeCommand ('de_DE'), u'console | Firefox DevTools Slack  Dokument']
IO - speech.speak (08:56:39.999):
Speaking [LangChangeCommand ('de_DE'), u'Nachrichteneingabe  Formular']
IO - speech.speak (08:56:40.000):
Speaking [LangChangeCommand ('de_DE'), u'Nachricht an #console  Eingabefeld  reduziert  mit AutoVervollst\xe4ndigung  Mehrzeilig']
IO - speech.speak (08:56:40.039):
Speaking [LangChangeCommand ('de_DE'), u'Leer']
IO - braille.BrailleBuffer.update (08:56:40.068):
Braille regions text: [u'console | Firefox DevTools Slack - Mozilla Firefox ', u'console | Firefox DevTools Slack Dok ', u'Nachrichteneingabe Formular ', u'Nachricht an #console + ... Mz ef ', ' ']
IO - braille.BrailleHandler.update (08:56:40.068):
Braille window dots: -
IO - braille.BrailleHandler.update (08:56:40.069):
Braille window dots: -
IO - braille.BrailleBuffer.update (08:56:40.082):
Braille regions text: [u'console | Firefox DevTools Slack - Mozilla Firefox ', u'console | Firefox DevTools Slack Dok ', u'Nachrichteneingabe Formular ', u'Nachricht an #console + ... Mz ef ', ' ']
IO - braille.BrailleHandler.update (08:56:40.082):
Braille window dots: -
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:40.104):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (08:56:46.434):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
IO - speech.speak (08:56:46.579):
Speaking [LangChangeCommand ('de_DE'), u'Benachrichtigung']
IO - inputCore.InputManager.executeGesture (08:56:52.335):
Input: kb(laptop):NVDA+f1
DEBUGWARNING - watchdog._watcher (08:56:56.460):
Trying to recover from freeze, core stack:
  File "nvda.pyw", line 212, in <module>
  File "core.pyc", line 473, in main
  File "wx\_core.pyc", line 8657, in MainLoop
  File "wx\_core.pyc", line 7952, in MainLoop
  File "core.pyc", line 444, in Notify
  File "queueHandler.pyc", line 83, in pumpAll
  File "queueHandler.pyc", line 50, in flushQueue
  File "scriptHandler.pyc", line 145, in _queueScriptCallback
  File "scriptHandler.pyc", line 187, in executeScript
  File "globalCommands.pyc", line 1432, in script_navigatorObject_devInfo
  File "logging\__init__.pyc", line 1167, in info
  File "logHandler.pyc", line 134, in _log
  File "wx\_core.pyc", line 13263, in SetInsertionPointEnd

As you can see, there's a lot going on, and several errors are thrown in the process. I also hear several NVDA error sounds. The freeze usually occurs when the channel is basically there already, but NVDA hasn't invoked focus mode yet on the message input field.

So, there seems to be a way to at least sometimes trigger this deadlock. And maybe the above information also helps in the diagnostics.
Looking at the dumps from VFO, I think what's happening is this:

1. An MTA thread services a call fetching a short-lived accessible for the very first time. Even though this is the initial fetch, the accessible is about to die.
2. COM queries for IMarshal. When handling QI for IMarshal, we acquire mStdMarshalMutex.
3. Because this is the first QI for IMarshal, we create a FastMarshaler.
4. FastMarshaler calls CoGetStdMarshalEx.
5. CoGetStdMarshalEx queries for IFastRundown.
6. The Interceptor doesn't know about IFastRundown, so it assumes it is a target interface it must intercept. It dispatches the QI to the main thread and waits for it.
7. Meanwhile, before the main thread can service the QI dispatched in 6), Gecko shuts down the accessible.
8. shutdown calls Interceptor::DisconnectRemotesForTarget, which calls CoDisconnectObject, which must in turn QI to IMarshal.
9. QI to IMarshal acquires mStdMarshalMutex.
10. Evil deadlock ensues, since the MTA thread is still holding the mutex as per 2).

We really don't want to do cross-thread calls for a QI to IMarshal. In this case, I think we can get around this by just returning E_NOINTERFACE for IFastRundown, since we don't need fast rundown behaviour anyway. Fast rundown is only relevant for COM garbage collection, which we have explicitly disabled. Even if we *did* want fast rundown in future, we could just make this decision in the Interceptor without a cross-thread QI, since it's just a marker interface (no methods).
Relevant stacks for reference:

The MTA thread servicing the fetch of the accessible:

0:014> ~18 kp
 # Child-SP          RetAddr           Call Site
00 0000005b`593fd4a0 00007ffc`a25e56a6 xul!mozilla::mscom::SpinEvent::Wait(void * aTargetThread = 0x00000000`000006dc)+0x45 [z:\build\build\src\ipc\mscom\spinevent.cpp @ 62] 
01 (Inline Function) --------`-------- xul!`anonymous-namespace'::SyncRunnable::WaitUntilComplete+0x10 [z:\build\build\src\ipc\mscom\mainthreadinvoker.cpp @ 72] 
02 0000005b`593fd4e0 00007ffc`a25dd8c5 xul!mozilla::mscom::MainThreadInvoker::Invoke(struct already_AddRefed<nsIRunnable> * aRunnable = <Value unavailable error>)+0x11e [z:\build\build\src\ipc\mscom\mainthreadinvoker.cpp @ 171] 
03 0000005b`593fd510 00007ffc`a25dce94 xul!mozilla::mscom::Interceptor::QueryInterfaceTarget(struct _GUID * aIid = 0x00007ffc`e541f5c8 {00000040-0000-0000-C000-000000000046}, void ** aOutput = 0x0000005b`593fd5a0, class mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> * aOutDuration = 0x0000005b`593fd5e0)+0xa9 [z:\build\build\src\ipc\mscom\interceptor.cpp @ 729] 
04 0000005b`593fd580 00007ffc`a25ddbe1 xul!mozilla::mscom::Interceptor::GetInterceptorForIID(struct _GUID * aIid = <Value unavailable error>, void ** aOutInterceptor = 0x0000005b`593fd740)+0x144 [z:\build\build\src\ipc\mscom\interceptor.cpp @ 652] 
05 0000005b`593fd660 00007ffc`a25df501 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface(struct _GUID * aIid = 0x00000000`000006dc --- memory read error at address 0x00000000`000006dc ---, struct IUnknown ** aOutInterface = 0x0000005b`593fd740)+0x275 [z:\build\build\src\ipc\mscom\interceptor.cpp @ 820] 
06 0000005b`593fd6f0 00007ffc`e5254a26 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface(struct _GUID * riid = 0x00007ffc`e541f5c8 {00000040-0000-0000-C000-000000000046}, void ** ppv = 0x0000005b`593fd8a0)+0xb5 [z:\build\build\src\ipc\mscom\weakref.cpp @ 121] 
07 0000005b`593fd730 00007ffc`e526067f combase!CarefullyQueryNewInterface(struct IUnknown * punk = 0x0000021a`3df4de80, struct _GUID * iid = 0x00007ffc`e541f5c8 {00000040-0000-0000-C000-000000000046}, void ** ppv = 0x0000005b`593fd8a0)+0x176 [onecore\com\combase\common\carefulqi.cpp @ 38] 
08 (Inline Function) --------`-------- combase!CarefullyQueryNewInterface+0x1d [onecore\com\combase\ih\carefulqi.hpp @ 26] 
09 0000005b`593fd870 00007ffc`e529b9f6 combase!CStdIdentity::CStdIdentity(unsigned long flags = 0, unsigned long dwAptId = <Value unavailable error>, struct IUnknown * pUnkOuter = <Value unavailable error>, struct IUnknown * pUnkControl = 0x0000021a`3df4de80, struct IUnknown ** ppUnkInternal = 0x0000021a`43dd8d78, int * pfSuccess = 0x0000005b`593fd9c0)+0x27f [onecore\com\combase\dcomrem\stdid.cxx @ 186] 
0a 0000005b`593fd980 00007ffc`e529b91b combase!GetStdId(struct IUnknown * punkOuter = 0x0000021a`3df4de80, struct IUnknown ** ppUnkInner = 0x0000021a`43dd8d78)+0x7a [onecore\com\combase\dcomrem\stdid.cxx @ 2242] 
0b 0000005b`593fda20 00007ffc`a25e04b2 combase!CoGetStdMarshalEx(struct IUnknown * punkOuter = 0x0000021a`3df4de80, unsigned long dwFlags = 1, struct IUnknown ** ppUnkInner = 0x0000021a`43dd8d78)+0xdb [onecore\com\combase\dcomrem\coapi.cxx @ 156] 
0c 0000005b`593fda70 00007ffc`a25e3adf xul!mozilla::mscom::FastMarshaler::FastMarshaler(struct IUnknown * aOuter = 0x0000021a`3df4de80, HRESULT * aResult = 0x0000005b`593fdad0)+0x72 [z:\build\build\src\ipc\mscom\fastmarshaler.cpp @ 43] 
0d 0000005b`593fdaa0 00007ffc`a25ddaae xul!mozilla::mscom::FastMarshaler::Create(struct IUnknown * aOuter = 0x0000021a`3df4de80, struct IUnknown ** aOutMarshalerUnk = 0x0000021a`3df4df28)+0x43 [z:\build\build\src\ipc\mscom\fastmarshaler.cpp @ 29] 
0e 0000005b`593fdad0 00007ffc`a25df501 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface(struct _GUID * aIid = <Value unavailable error>, struct IUnknown ** aOutInterface = 0x0000005b`593fdbb0)+0x142 [z:\build\build\src\ipc\mscom\interceptor.cpp @ 782] 
0f 0000005b`593fdb60 00007ffc`e52590e2 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface(struct _GUID * riid = 0x00007ffc`e541f1f8 {00000003-0000-0000-C000-000000000046}, void ** ppv = 0x0000005b`593fdbe8)+0xb5 [z:\build\build\src\ipc\mscom\weakref.cpp @ 121] 
10 (Inline Function) --------`-------- combase!CDestObjectWrapper::GetMarshalSizeMax+0x6c [onecore\com\combase\dcomrem\coapi.cxx @ 602] 
11 0000005b`593fdba0 00007ffc`e525a749 combase!CoGetMarshalSizeMax(unsigned long * pulSize = 0x0000005b`593fdcd0, struct _GUID * riid = 0x00007ffc`d2b51db4 {00020400-0000-0000-C000-000000000046}, struct IUnknown * pUnk = 0x0000021a`50d29b28, unsigned long dwDestCtx = <Value unavailable error>, void * pvDestCtx = 0x00000000`00000000, unsigned long mshlflags = 0)+0x1e2 [onecore\com\combase\dcomrem\coapi.cxx @ 866] 
12 0000005b`593fdc70 00007ffc`e7567b43 combase!Ndr64ExtInterfacePointerBufferSize(struct _MIDL_STUB_MESSAGE * pStubMsg = 0x0000005b`593fdf60, unsigned char * pMemory = 0x0000021a`50d29b28 "--- memory read error at address 0x0000021a`50d29b28 ---", void * pFormat = <Value unavailable error>)+0x69 [onecore\com\combase\ndr\ndrole64\oleaux64.cxx @ 102] 
13 0000005b`593fdcc0 00007ffc`e7567afc rpcrt4!Ndr64TopLevelPointerBufferSize+0xf3
14 0000005b`593fdcf0 00007ffc`e75f5297 rpcrt4!Ndr64TopLevelPointerBufferSize+0xac
15 0000005b`593fdd20 00007ffc`e75f9477 rpcrt4!Ndr64pSizing+0x2b7
16 0000005b`593fddd0 00007ffc`e756f019 rpcrt4!Ndr64StubWorker+0xc97
17 0000005b`593fe480 00007ffc`e528dcab rpcrt4!NdrStubCall3+0xc9
18 0000005b`593fe4e0 00007ffc`e752a98b combase!CStdStubBuffer_Invoke(struct IRpcStubBuffer * This = <Value unavailable error>, struct tagRPCOLEMESSAGE * prpcmsg = 0x0000021a`3a07ead0, struct IRpcChannelBuffer * pRpcChannelBuffer = 0x0000021a`3a07ead0)+0x8b [onecore\com\combase\ndr\ndrole\stub.cxx @ 1446] 
...

The main thread handling the shutdown of the accessible:

0:014> ~0 kp 10
 # Child-SP          RetAddr           Call Site
00 0000005b`567fd6e8 00007ffc`e7c9c18f ntdll!NtWaitForAlertByThreadId+0x14
01 0000005b`567fd6f0 00007ffc`e7c9bf5b ntdll!RtlpWaitOnAddressWithTimeout+0x43
02 0000005b`567fd720 00007ffc`e7c70c49 ntdll!RtlpWaitOnCriticalSection+0x15f
03 0000005b`567fd7d0 00007ffc`e7c70b60 ntdll!RtlpEnterCriticalSectionContended+0xd9
04 0000005b`567fd800 00007ffc`a25dda7b ntdll!RtlEnterCriticalSection+0x40
05 (Inline Function) --------`-------- xul!mozilla::OffTheBooksMutex::Lock+0x9 [z:\build\build\src\obj-firefox\dist\include\mozilla\mutex.h @ 65] 
06 (Inline Function) --------`-------- xul!mozilla::BaseAutoLock<mozilla::Mutex>::{ctor}+0x9 [z:\build\build\src\obj-firefox\dist\include\mozilla\mutex.h @ 166] 
07 0000005b`567fd830 00007ffc`a25df501 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface(struct _GUID * aIid = <Value unavailable error>, struct IUnknown ** aOutInterface = 0x0000005b`567fd910)+0x10f [z:\build\build\src\ipc\mscom\interceptor.cpp @ 778] 
08 0000005b`567fd8c0 00007ffc`e528f628 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface(struct _GUID * riid = 0x00007ffc`e541f1f8 {00000003-0000-0000-C000-000000000046}, void ** ppv = 0x0000005b`567fd930)+0xb5 [z:\build\build\src\ipc\mscom\weakref.cpp @ 121] 
09 0000005b`567fd900 00007ffc`a25dca39 combase!CoDisconnectObject(struct IUnknown * pUnk = 0x0000021a`3df4de80, unsigned long dwReserved = 0)+0x68 [onecore\com\combase\dcomrem\coapi.cxx @ 1953] 
0a 0000005b`567fd930 00007ffc`a44fa17d xul!mozilla::mscom::Interceptor::DisconnectRemotesForTarget(struct IUnknown * aTarget = <Value unavailable error>)+0x85 [z:\build\build\src\ipc\mscom\interceptor.cpp @ 855] 
0b 0000005b`567fd960 00007ffc`a453b87c xul!mozilla::a11y::AccessibleWrap::Shutdown(void)+0x61 [z:\build\build\src\accessible\windows\msaa\accessiblewrap.cpp @ 121]
m_kato, can you try this try build https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2430aeec721907d57e299b9b35bc4a048506cb7&selectedJob=165930220
and see if you still get those deadlocks? I still do, so my situation is a little different than what this try build addresses, but it would be interesting to see if you also still deadlocks with this try build.
Flags: needinfo?(m_kato)
(In reply to Marco Zehe (:MarcoZ) from comment #7)
> and see if you still get those deadlocks? I still do, so my situation is a
> little different than what this try build addresses,

I reproduced the deadlock you're seeing now, Marco. It's the same deadlock, just with a different interface:
{334D391F-0E79-3B15-C9FF-EAC65DD07C42}
This interface isn't documented anywhere I can find. It does show up in quite a few threads where people are trying to debug their COM stuff, but there's no info specifically about this interface. The stack also shows this interesting frame:

0b 053bdd30 76e45136 combase!IUnknown::QueryInterface<INotARealInterface>(struct INotARealInterface ** pp = 0x053bdd4c)+0x8d [sdk\inc\unknwnbase.h @ 130] 

INotARealInterface? Riiight. So it's probably some other marker interface private to COM.

I could just hard-code avoidance for this IID too. However, I'm worried we'll just keep hitting more of them... and there might be others on other versions of Windows. I'm going to try to implement a more general solution for this, but that carries its own kind of risk.
(In reply to Marco Zehe (:MarcoZ) from comment #7)
> m_kato, can you try this try build
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=f2430aeec721907d57e299b9b35bc4a048506cb7&selectedJob=1
> 65930220
> and see if you still get those deadlocks? I still do, so my situation is a
> little different than what this try build addresses, but it would be
> interesting to see if you also still deadlocks with this try build.

Unfortunately, not resolved...


  0:041> ~0k
Child-SP          RetAddr           Call Site
00000014`6a5fd288 00007ffe`bfe1c18f ntdll!NtWaitForAlertByThreadId+0x14
00000014`6a5fd290 00007ffe`bfe1bf5b ntdll!RtlpWaitOnAddressWithTimeout+0x43
00000014`6a5fd2c0 00007ffe`bfdf0c49 ntdll!RtlpWaitOnCriticalSection+0x15f
00000014`6a5fd370 00007ffe`bfdf0b60 ntdll!RtlpEnterCriticalSectionContended+0xd9
00000014`6a5fd3a0 00007ffe`7d2b3bbb ntdll!RtlEnterCriticalSection+0x40
(Inline Function) --------`-------- xul!mozilla::OffTheBooksMutex::Lock+0x9
(Inline Function) --------`-------- xul!mozilla::BaseAutoLock<mozilla::Mutex>::{ctor}+0x9
00000014`6a5fd3d0 00007ffe`7d2b55e5 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0x10f
00000014`6a5fd460 00007ffe`bf6ef628 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0xb5
00000014`6a5fd4a0 00007ffe`7d2b2b41 combase!CoDisconnectObject+0x68
00000014`6a5fd4d0 00007ffe`7f20a5e5 xul!mozilla::mscom::Interceptor::DisconnectRemotesForTarget+0x85
00000014`6a5fd500 00007ffe`7f24bb84 xul!mozilla::a11y::AccessibleWrap::Shutdown+0x61
00000014`6a5fd530 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::UnbindFromDocument+0xec
00000014`6a5fd560 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd5a0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd5e0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd620 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd660 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd6a0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd6e0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd720 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd760 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd7a0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd7e0 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd820 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd860 00007ffe`7f24a0ce xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd8a0 00007ffe`7f220cd6 xul!mozilla::a11y::DocAccessible::ShutdownChildrenInSubtree+0x72
00000014`6a5fd8e0 00007ffe`7f22385d xul!mozilla::a11y::NotificationController::ProcessMutationEvents+0xe6
00000014`6a5fd980 00007ffe`7f223068 xul!mozilla::a11y::NotificationController::WillRefresh+0x969
00000014`6a5fdc80 00007ffe`7e7eb102 xul!mozilla::a11y::NotificationController::WillRefresh+0x174
00000014`6a5fdf80 00007ffe`7e7e8777 xul!nsRefreshDriver::Tick+0x492
00000014`6a5fe510 00007ffe`7e7e8708 xul!nsRefreshDriver::DoTick+0x67
00000014`6a5fe580 00007ffe`7e7e8947 xul!nsRefreshDriver::DoRefresh+0x20
00000014`6a5fe5b0 00007ffe`7d5aa4d3 xul!nsRefreshDriver::FinishedWaitingForTransaction+0x4f
00000014`6a5fe5e0 00007ffe`7e4964d2 xul!mozilla::layers::WebRenderLayerManager::DidComposite+0x93
00000014`6a5fe610 00007ffe`7d6489da xul!mozilla::dom::TabChild::DidComposite+0x56
00000014`6a5fe640 00007ffe`7d25f3b7 xul!mozilla::layers::CompositorBridgeChild::RecvDidComposite+0xce
00000014`6a5fe690 00007ffe`7d084aa7 xul!mozilla::layers::PCompositorBridgeChild::OnMessageReceived+0x6af
00000014`6a5fea00 00007ffe`7d084e7f xul!mozilla::ipc::MessageChannel::DispatchAsyncMessage+0x63
00000014`6a5fea30 00007ffe`7d089aa7 xul!mozilla::ipc::MessageChannel::DispatchMessageW+0x18f
00000014`6a5feaf0 00007ffe`7d08995a xul!mozilla::ipc::MessageChannel::RunMessage+0x11f
00000014`6a5feb30 00007ffe`7cd24fba xul!mozilla::ipc::MessageChannel::MessageTask::Run+0x4e
00000014`6a5feb60 00007ffe`7cd2ee35 xul!mozilla::SchedulerGroup::Runnable::Run+0x96
00000014`6a5febe0 00007ffe`7cd35ebb xul!nsThread::ProcessNextEvent+0x5e5
00000014`6a5ff2d0 00007ffe`7d08970b xul!NS_ProcessNextEvent+0x2f
00000014`6a5ff300 00007ffe`7d0897d3 xul!mozilla::ipc::MessagePump::Run+0xb3
00000014`6a5ff340 00007ffe`7d0699eb xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x6b
(Inline Function) --------`-------- xul!MessageLoop::RunInternal+0xf
00000014`6a5ff370 00007ffe`7d0696e2 xul!MessageLoop::RunHandler+0x4b
00000014`6a5ff3a0 00007ffe`7e628a1b xul!MessageLoop::Run+0x1e
00000014`6a5ff3f0 00007ffe`7e67054f xul!nsBaseAppShell::Run+0x33
00000014`6a5ff420 00007ffe`7f41a61b xul!nsAppShell::Run+0xbb
00000014`6a5ff450 00007ffe`7d089791 xul!XRE_RunAppShell+0x3b
00000014`6a5ff480 00007ffe`7d0699eb xul!mozilla::ipc::MessagePumpForChildProcess::Run+0x29
(Inline Function) --------`-------- xul!MessageLoop::RunInternal+0xf
00000014`6a5ff4b0 00007ffe`7d0696e2 xul!MessageLoop::RunHandler+0x4b
00000014`6a5ff4e0 00007ffe`7f41a3b9 xul!MessageLoop::Run+0x1e


0:041> ~36k
Child-SP          RetAddr           Call Site
(Inline Function) --------`-------- xul!std::_Load_seq_cst_4
(Inline Function) --------`-------- xul!std::_Load_acquire_4
(Inline Function) --------`-------- xul!std::_Atomic_load_4
(Inline Function) --------`-------- xul!std::atomic_load_explicit
(Inline Function) --------`-------- xul!std::_Atomic_uint::load
(Inline Function) --------`-------- xul!mozilla::detail::IntrinsicMemoryOps<unsigned int,1>::load
(Inline Function) --------`-------- xul!mozilla::Atomic<bool,1,void>::operator bool
00000014`7641d420 00007ffe`7d2bb79a xul!mozilla::mscom::SpinEvent::Wait+0x3d
(Inline Function) --------`-------- xul!`anonymous-namespace'::SyncRunnable::WaitUntilComplete+0x10
00000014`7641d460 00007ffe`7d2b3a05 xul!mozilla::mscom::MainThreadInvoker::Invoke+0x122
00000014`7641d490 00007ffe`7d2b2fb8 xul!mozilla::mscom::Interceptor::QueryInterfaceTarget+0xa9
00000014`7641d500 00007ffe`7d2b3d21 xul!mozilla::mscom::Interceptor::GetInterceptorForIID+0x144
00000014`7641d5e0 00007ffe`7d2b55e5 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0x275
00000014`7641d670 00007ffe`bf6fb8ab xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0xb5
00000014`7641d6b0 00007ffe`7d2b6596 combase!CoGetStdMarshalEx+0x6b
00000014`7641d700 00007ffe`7d2b9bcf xul!mozilla::mscom::FastMarshaler::FastMarshaler+0x72
00000014`7641d730 00007ffe`7d2b3bee xul!mozilla::mscom::FastMarshaler::Create+0x43
00000014`7641d760 00007ffe`7d2b55e5 xul!mozilla::mscom::Interceptor::WeakRefQueryInterface+0x142
00000014`7641d7f0 00007ffe`bf6b90e2 xul!mozilla::mscom::WeakReferenceSupport::QueryInterface+0xb5
(Inline Function) --------`-------- combase!CDestObjectWrapper::GetMarshalSizeMax+0x6c
00000014`7641d830 00007ffe`bf6ba749 combase!CoGetMarshalSizeMax+0x1e2
00000014`7641d900 00007ffe`bfa67b43 combase!Ndr64ExtInterfacePointerBufferSize+0x69
00000014`7641d950 00007ffe`bfa67afc RPCRT4!Ndr64TopLevelPointerBufferSize+0xf3
00000014`7641d980 00007ffe`bfaf5297 RPCRT4!Ndr64TopLevelPointerBufferSize+0xac
00000014`7641d9b0 00007ffe`bfaf9477 RPCRT4!Ndr64pSizing+0x2b7
00000014`7641da60 00007ffe`bfa6f019 RPCRT4!Ndr64StubWorker+0xc97
00000014`7641e110 00007ffe`bf6edcab RPCRT4!NdrStubCall3+0xc9
00000014`7641e170 00007ffe`bfa2a98b combase!CStdStubBuffer_Invoke+0x8b
00000014`7641e1b0 00007ffe`bf6a31b3 RPCRT4!CStdStubBuffer_Invoke+0x3b
(Inline Function) --------`-------- combase!InvokeStubWithExceptionPolicyAndTracing::__l6::<lambda_76d9e92c799d246a4afbe64a2bf5673d>::operator()+0x2b
00000014`7641e1e0 00007ffe`bf6a14b2 combase!ObjectMethodExceptionHandlingAction<<lambda_76d9e92c799d246a4afbe64a2bf5673d> >+0x53
(Inline Function) --------`-------- combase!InvokeStubWithExceptionPolicyAndTracing+0xd9
00000014`7641e240 00007ffe`bf6a3ea2 combase!DefaultStubInvoke+0x2d2
(Inline Function) --------`-------- combase!SyncStubCall::Invoke+0x2c
(Inline Function) --------`-------- combase!SyncServerCall::StubInvoke+0x2c
(Inline Function) --------`-------- combase!StubInvoke+0x2b9
00000014`7641e3c0 00007ffe`bf69d8df combase!ServerCall::ContextInvoke+0x492
(Inline Function) --------`-------- combase!CServerChannel::ContextInvoke+0x84
(Inline Function) --------`-------- combase!DefaultInvokeInApartment+0x9d
00000014`7641e7e0 00007ffe`bf69e66b combase!AppInvoke+0x2ff
00000014`7641e8e0 00007ffe`bf6a27ea combase!ComInvokeWithLockAndIPID+0x55b
00000014`7641eb70 00007ffe`bfa473b4 combase!ThreadInvoke+0xefa
00000014`7641ee30 00007ffe`bfa4654e RPCRT4!DispatchToStubInCNoAvrf+0x24
00000014`7641ee80 00007ffe`bfa46f84 RPCRT4!RPC_INTERFACE::DispatchToStubWorker+0x1be
00000014`7641ef50 00007ffe`bfa506a3 RPCRT4!RPC_INTERFACE::DispatchToStubWithObject+0x154
00000014`7641eff0 00007ffe`bfa513a6 RPCRT4!LRPC_SCALL::DispatchRequest+0x183
00000014`7641f0d0 00007ffe`bfa4d12e RPCRT4!LRPC_SCALL::HandleRequest+0x996
00000014`7641f1e0 00007ffe`bfa4e853 RPCRT4!LRPC_ADDRESS::HandleRequest+0x34e
00000014`7641f290 00007ffe`bfa7cc68 RPCRT4!LRPC_ADDRESS::ProcessIO+0x8a3
00000014`7641f3d0 00007ffe`bfe065ce RPCRT4!LrpcIoComplete+0xd8
00000014`7641f470 00007ffe`bfe04b46 ntdll!TppAlpcpExecuteCallback+0x22e
00000014`7641f4f0 00007ffe`befb1fe4 ntdll!TppWorkerThread+0x886
00000014`7641f880 00007ffe`bfe3efc1 KERNEL32!BaseThreadInitThunk+0x14
00000014`7641f8b0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
Flags: needinfo?(m_kato)
(In reply to Makoto Kato [:m_kato] from comment #9)
> Unfortunately, not resolved...

What about this new one?
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a41a297f16307b26fb7e1fb7302dd98e3fc26576&selectedJob=166156315
Flags: needinfo?(m_kato)
To reiterate what I said on IRC: I've been running with this latest try build for several hours, have reloaded Slack workspaces several times (something that easily triggered the freezes before), did a lot of things on sites that have GreaseMonkey scripts (like Github) and those who don't, and I didn't encounter any freezes, crashes, or inconsistencies of any kind. So this gets a big thumbs up from me from a user-facing side.
Comment on attachment 8956406 [details]
Bug 1442523: mscom::Interceptor: Don't dispatch QI calls to the main thread while creating a marshaler.

https://reviewboard.mozilla.org/r/225292/#review231364

Makes sense to me.
Attachment #8956406 - Flags: review?(aklotz) → review+
Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b62ac052aa5a
mscom::Interceptor: Don't dispatch QI calls to the main thread while creating a marshaler. r=aklotz
https://hg.mozilla.org/mozilla-central/rev/b62ac052aa5a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
(In reply to Marco Zehe (:MarcoZ) from comment #10)
> (In reply to Makoto Kato [:m_kato] from comment #9)
> > Unfortunately, not resolved...
> 
> What about this new one?
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=a41a297f16307b26fb7e1fb7302dd98e3fc26576&selectedJob=1
> 66156315

When I test it for 3 hours, I cannot reproduce this.  Thanks.
Flags: needinfo?(m_kato)
You need to log in before you can comment on or make changes to this bug.