Bug 1791767 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

[be1cda4f-0d00-45f0-8802-629180220919](https://crash-stats.mozilla.org/report/index/be1cda4f-0d00-45f0-8802-629180220919#allthreads) shows a case with `IndexedDB #1,SHDRCV` being stuck on a `SpinEventLoopUntil`:

```
0	ZwWaitForAlertByThreadId
1	RtlSleepConditionVariableSRW
2	SleepConditionVariableSRW
3	mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
4	mozilla::OffTheBooksCondVar::Wait()
4	mozilla::ThreadEventQueue::GetEvent(bool, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*)
4	nsThread::ProcessNextEvent(bool, bool*)
5	NS_ProcessNextEvent(nsIThread*, bool)
6	mozilla::SpinEventLoopUntil(nsTSubstring<char> const&, mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run::<lambda_87>&&, nsIThread*)
6	mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run()
7	nsThread::ProcessNextEvent(bool, bool*)
8	NS_ProcessNextEvent(nsIThread*, bool)
8	mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
```

This indicates a possible misalignment between [`gLiveDatabaseHashtable->Count()`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#12902-12906) during `QuotaManager` shutdown (which was not blocked) and the `ConnectionPool` state, as it needs to explicitly call [`ConnectionPool::ShutdownThread`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#8206) to unblock that `SpinEventLoopUntil` we see blocking here.
[be1cda4f-0d00-45f0-8802-629180220919](https://crash-stats.mozilla.org/report/index/be1cda4f-0d00-45f0-8802-629180220919#allthreads) shows a case with `IndexedDB #1,SHDRCV` being stuck on a `SpinEventLoopUntil`:

```
0	ZwWaitForAlertByThreadId
1	RtlSleepConditionVariableSRW
2	SleepConditionVariableSRW
3	mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
4	mozilla::OffTheBooksCondVar::Wait()
4	mozilla::ThreadEventQueue::GetEvent(bool, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*)
4	nsThread::ProcessNextEvent(bool, bool*)
5	NS_ProcessNextEvent(nsIThread*, bool)
6	mozilla::SpinEventLoopUntil(nsTSubstring<char> const&, mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run::<lambda_87>&&, nsIThread*)
6	mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run()
7	nsThread::ProcessNextEvent(bool, bool*)
8	NS_ProcessNextEvent(nsIThread*, bool)
8	mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
```

This indicates a possible misalignment between [`gLiveDatabaseHashtable->Count()`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#12902-12906) being zero during `QuotaManager` shutdown (which was not blocked) and the `ConnectionPool` state, as it needs to explicitly call [`ConnectionPool::ShutdownThread`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#8206) to unblock that `SpinEventLoopUntil` we see blocking here.
[be1cda4f-0d00-45f0-8802-629180220919](https://crash-stats.mozilla.org/report/index/be1cda4f-0d00-45f0-8802-629180220919#allthreads) shows a case with `IndexedDB #1,SHDRCV` being stuck on a `SpinEventLoopUntil`:

```
0	ZwWaitForAlertByThreadId
1	RtlSleepConditionVariableSRW
2	SleepConditionVariableSRW
3	mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
4	mozilla::OffTheBooksCondVar::Wait()
4	mozilla::ThreadEventQueue::GetEvent(bool, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*)
4	nsThread::ProcessNextEvent(bool, bool*)
5	NS_ProcessNextEvent(nsIThread*, bool)
6	mozilla::SpinEventLoopUntil(nsTSubstring<char> const&, mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run::<lambda_87>&&, nsIThread*)
6	mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run()
7	nsThread::ProcessNextEvent(bool, bool*)
8	NS_ProcessNextEvent(nsIThread*, bool)
8	mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
```

This indicates a possible misalignment between [`gLiveDatabaseHashtable->Count()`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#12902-12906) being zero during `QuotaManager` shutdown (which was not blocked) and the `ConnectionPool` state, as it needs to explicitly call [`ConnectionPool::ShutdownThread`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#8206) for all threads to unblock that `SpinEventLoopUntil` we see blocking here.
[be1cda4f-0d00-45f0-8802-629180220919](https://crash-stats.mozilla.org/report/index/be1cda4f-0d00-45f0-8802-629180220919#allthreads) shows a case with `IndexedDB #1,SHDRCV` being stuck on a `SpinEventLoopUntil`:

```
0	ZwWaitForAlertByThreadId
1	RtlSleepConditionVariableSRW
2	SleepConditionVariableSRW
3	mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
4	mozilla::OffTheBooksCondVar::Wait()
4	mozilla::ThreadEventQueue::GetEvent(bool, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*)
4	nsThread::ProcessNextEvent(bool, bool*)
5	NS_ProcessNextEvent(nsIThread*, bool)
6	mozilla::SpinEventLoopUntil(nsTSubstring<char> const&, mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run::<lambda_87>&&, nsIThread*)
6	mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run()
7	nsThread::ProcessNextEvent(bool, bool*)
8	NS_ProcessNextEvent(nsIThread*, bool)
8	mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
```

This indicates a possible misalignment between [`gLiveDatabaseHashtable->Count()`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#12902-12906) being zero during `QuotaManager` shutdown (which was not blocked) and the `ConnectionPool` state, as it needs to explicitly call [`ConnectionPool::ShutdownThread`](https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/dom/indexedDB/ActorsParent.cpp#8206) for all its threads to unblock that `SpinEventLoopUntil` we see blocking here.

Back to Bug 1791767 Comment 0