Closed Bug 1892800 Opened 6 months ago Closed 5 months ago

Shutdown Hang waiting for background SuggestStore::injest to finish

Categories

(Application Services :: Suggest, defect)

Unspecified
Windows 11
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1895110

People

(Reporter: worcester12345, Unassigned)

Details

(Keywords: crash)

Crash report: https://crash-stats.mozilla.org/report/index/2c871f79-5435-40aa-a6c5-8f1fe0240422

MOZ_CRASH Reason: Shutdown hanging at step XPCOMShutdownThreads. Something is blocking the main-thread.

Top 9 frames:

0  xul.dll  MOZ_Crash(char const*, int, char const*)  mfbt/Assertions.h:317
0  xul.dll  mozilla::(anonymous namespace)::RunWatchdog(void*)  toolkit/components/terminator/nsTerminator.cpp:244
1  nss3.dll  _PR_NativeRunThread(void*)  nsprpub/pr/src/threads/combined/pruthr.c:399
2  nss3.dll  pr_root(void*)  nsprpub/pr/src/md/windows/w95thred.c:139
3  ucrtbase.dll  thread_start<unsigned int (__cdecl*)(void*), 1>
4  kernel32.dll  BaseThreadInitThunk
5  mozglue.dll  mozilla::interceptor::FuncHook<mozilla::interceptor::WindowsDllInterceptor<mo...  toolkit/xre/dllservices/mozglue/nsWindowsDllInterceptor.h:150
5  mozglue.dll  patched_BaseThreadInitThunk(int, void*, void*)  toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp:562
6  ntdll.dll  RtlUserThreadStart
Component: General → XPCOM
Product: Firefox → Core

The hang in comment 0 is in SuggestStore::injest being called through UniFFI and hanging. Redirecting to the relevant component.

The following is the stack on BGIOThreadPool #2 from the crash report:

btreeParseCell(MemPage*, int, CellInfo*)
getCellInfo(BtCursor*)
sqlite3BtreePayloadSize(BtCursor*)
sqlite3VdbeExec(Vdbe*)
sqlite3Step(Vdbe*)
sqlite3_step(sqlite3_stmt*)
rusqlite::raw_statement::RawStatement::step()
rusqlite::statement::Statement::execute_with_bound_parameters()
rusqlite::statement::Statement::execute(ref$<slice2$<tuple$<ref$<str$>, ref$<dyn$<rusqlite::types::to_sql::ToSql> > > > >)
sql_support::conn_ext::ConnExt::execute_cached<rusqlite::Connection, ref$<slice2$<tuple$<ref$<str$>, ref$<dyn$<rusqlite::types::to_sql::ToSql> > > > > >(rusqlite::Connection*, ref$<str$>, ref$<slice2$<tuple$<ref$<str$>, ref$<dyn$<rusqlite::types::to_sql::ToSql> > > > >)
suggest::db::SuggestDao::drop_suggestions(suggest::rs::SuggestRecordId*)
suggest::store::impl$6::ingest_record::closure$0(suggest::store::impl$6::ingest_record::closure_env$0<remote_settings::client::Client, suggest::store::impl$6::ingest_attachment::closure_env$1<remote_settings::client::Client, suggest::rs::DownloadedAmpSuggestion, suggest::store::impl$6::ingest_records::closure_env$3<remote_settings::client::Client> > >, suggest::db::SuggestDao*)
suggest::db::SuggestDb::write(suggest::store::impl$6::ingest_record::closure_env$0<remote_settings::client::Client, suggest::store::impl$6::ingest_attachment::closure_env$1<remote_settings::client::Client, suggest::rs::DownloadedAmpSuggestion, suggest::store::impl$6::ingest_records::closure_env$3<remote_settings::client::Client> > >)
suggest::store::SuggestStoreInner<remote_settings::client::Client>::ingest_record(ref$<str$>, suggest::db::SuggestDb*, remote_settings::client::RemoteSettingsRecord*, suggest::store::impl$6::ingest_attachment::closure_env$1<remote_settings::client::Client, suggest::rs::DownloadedAmpSuggestion, suggest::store::impl$6::ingest_records::closure_env$3<remote_settings::client::Client> >)
suggest::store::SuggestStoreInner<remote_settings::client::Client>::ingest_attachment(ref$<str$>, suggest::db::SuggestDb*, remote_settings::client::RemoteSettingsRecord*, suggest::store::impl$6::ingest_records::closure_env$3<remote_settings::client::Client>)
suggest::store::SuggestStoreInner<remote_settings::client::Client>::ingest_records<remote_settings::client::Client>(ref$<str$>, suggest::db::SuggestDb*, ref$<slice2$<remote_settings::client::RemoteSettingsRecord> >)
suggest::store::SuggestStoreInner<remote_settings::client::Client>::ingest_records_by_type(suggest::rs::SuggestRecordType, suggest::db::SuggestDb*, suggest::store::SuggestIngestionConstraints*)
suggest::store::SuggestStoreInner<remote_settings::client::Client>::ingest(suggest::store::SuggestIngestionConstraints)
suggest::store::impl$4::ingest::closure$0(suggest::store::impl$4::ingest::closure_env$0)
suggest::store::SuggestStore::ingest(suggest::store::SuggestIngestionConstraints)
suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure$1(suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1)
uniffi_core::ffi::rustcalls::rust_call_with_out_status::closure$0(uniffi_core::ffi::rustcalls::rust_call_with_out_status::closure_env$0<suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1, tuple$<> >)
std::panicking::try::do_call(unsigned char*)
std::panicking::try(uniffi_core::ffi::rustcalls::rust_call_with_out_status::closure_env$0<suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1, tuple$<> >)
std::panic::catch_unwind(uniffi_core::ffi::rustcalls::rust_call_with_out_status::closure_env$0<suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1, tuple$<> >)
uniffi_core::ffi::rustcalls::rust_call_with_out_status(uniffi_core::ffi::rustcalls::RustCallStatus*, suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1)
uniffi_core::ffi::rustcalls::rust_call(uniffi_core::ffi::rustcalls::RustCallStatus*, suggest::uniffi_suggest_fn_method_suggeststore_ingest::closure_env$1)
suggest::uniffi_suggest_fn_method_suggeststore_ingest(core::ffi::c_void*, uniffi_core::ffi::rustbuffer::RustBuffer, uniffi_core::ffi::rustcalls::RustCallStatus*)
mozilla::uniffi::ScaffoldingCallHandler<mozilla::uniffi::ScaffoldingConverter<void, mozilla::uniffi::ScaffoldingConverterTagDefault>, mozilla::uniffi::ScaffoldingObjectConverter<&mozilla::uniffi::kTabsTabsStorePointerType>, mozilla::uniffi::ScaffoldingConverter<mozilla::uniffi::RustBuffer, mozilla::uniffi::ScaffoldingConverterTagDefault> >::CallScaffoldingFuncHelper<0, 1>::<lambda_1>::operator()()
mozilla::uniffi::ScaffoldingCallHandler<mozilla::uniffi::ScaffoldingConverter<void, mozilla::uniffi::ScaffoldingConverterTagDefault>, mozilla::uniffi::ScaffoldingObjectConverter<&mozilla::uniffi::kTabsTabsStorePointerType>, mozilla::uniffi::ScaffoldingConverter<mozilla::uniffi::RustBuffer, mozilla::uniffi::ScaffoldingConverterTagDefault> >::CallScaffoldingFuncHelper(void (*)(void*, RustBuffer, RustCallStatus*), std::tuple<void*, mozilla::uniffi::OwnedRustBuffer>&&, std::integer_sequence<unsigned long long, 0, 1>)
mozilla::uniffi::ScaffoldingCallHandler<mozilla::uniffi::ScaffoldingConverter<void, mozilla::uniffi::ScaffoldingConverterTagDefault>, mozilla::uniffi::ScaffoldingObjectConverter<&mozilla::uniffi::kTabsTabsStorePointerType>, mozilla::uniffi::ScaffoldingConverter<mozilla::uniffi::RustBuffer, mozilla::uniffi::ScaffoldingConverterTagDefault> >::CallScaffoldingFunc(void (*)(void*, RustBuffer, RustCallStatus*), std::tuple<void*, mozilla::uniffi::OwnedRustBuffer>&&)
mozilla::uniffi::ScaffoldingCallHandler<mozilla::uniffi::ScaffoldingConverter<void, mozilla::uniffi::ScaffoldingConverterTagDefault>, mozilla::uniffi::ScaffoldingObjectConverter<&mozilla::uniffi::kTabsTabsStorePointerType>, mozilla::uniffi::ScaffoldingConverter<mozilla::uniffi::RustBuffer, mozilla::uniffi::ScaffoldingConverterTagDefault> >::CallAsync::<lambda_1>::operator()()
mozilla::detail::RunnableFunction<`lambda at /builds/worker/workspace/obj-build/dist/include/mozilla/dom/ScaffoldingCall.h:78:32'>::Run()
nsThreadPool::Run()
nsThread::ProcessNextEvent(bool, bool*)
NS_ProcessNextEvent(nsIThread*, bool)
mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
MessageLoop::RunInternal()
MessageLoop::RunHandler()
MessageLoop::Run()
nsThread::ThreadFunc(void*)
_PR_NativeRunThread(void*)
pr_root(void*)
thread_start<unsigned int (__cdecl*)(void*), 1>
BaseThreadInitThunk
mozilla::interceptor::FuncHook<mozilla::interceptor::WindowsDllInterceptor<mozilla::interceptor::VMSharingPolicyShared>, void (*)(int, void*, void*)>::operator()(int&, void*&, void*&) const
patched_BaseThreadInitThunk(int, void*, void*)
RtlUserThreadStart
Component: XPCOM → Relevancy
Product: Core → Application Services
Summary: Crash in [@ shutdownhang | mozilla::SpinEventLoopUntil | nsThreadPool::ShutdownWithTimeout] → Shutdown Hang waiting for background SuggestStore::injest to finish

Reset the component to "suggest".

Component: Relevancy → Suggest
Status: NEW → RESOLVED
Closed: 5 months ago
Duplicate of bug: 1895110
Resolution: --- → DUPLICATE
Keywords: crash
You need to log in before you can comment on or make changes to this bug.