Closed Bug 1823391 Opened 1 year ago Closed 8 months ago

Verify if WorkerScriptLoader mWorkerRef needs an explicit shutdown on callback

Categories

(Core :: DOM: Workers, task, P3)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: jstutte, Assigned: jstutte)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

From this log it seems we can hang due to WorkerScriptLoader's strong worker reference:

Hit MOZ_CRASH(Workers Hanging - 1|A:1|S:0|Q:0-BC:3IsChromeWorker(resource://gre/modules/PageThumbsWorker.js)|ScriptLoader) at /builds/worker/checkouts/gecko/dom/workers/RuntimeService.cpp:1604

Looking at how it is constructed, I see no body in the callback function that could do some explicit shutdown.

And the worker thread seems stuck idling on top of a sync loop (which might be the one from the loader):

[task 2023-02-09T00:11:52.314Z] 00:11:52     INFO -  Thread 46 DOM Worker
[task 2023-02-09T00:11:52.314Z] 00:11:52     INFO -   0  ntdll.dll!NtWaitForAlertByThreadId + 0xc
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -       eip = 0x77b046dc    esp = 0x1ebfded4    ebp = 0x1ebfdf2c    ebx = 0x1ebfdfa8
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -       esi = 0x00000000    edi = 0x2134dfa0    eax = 0x00000000    ecx = 0x00000000
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -       edx = 0x00000000 eflags = 0x00000206
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -      Found by: given as instruction pointer in context
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -   1  ntdll.dll!RtlSleepConditionVariableSRW + 0x11c
[task 2023-02-09T00:11:52.315Z] 00:11:52     INFO -       eip = 0x77ad22fd    esp = 0x1ebfded8    ebp = 0x1ebfdf2c    ebx = 0x1ebfdfa8
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -       esi = 0x00000000    edi = 0x2134dfa0
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -   2  KERNELBASE.dll!SleepConditionVariableSRW + 0x22
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -       eip = 0x75ae4903    esp = 0x1ebfdf34    ebp = 0x1ebfdf50    ebx = 0x1ebfdfa8
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -       esi = 0x00000000    edi = 0x2134dfa0
[task 2023-02-09T00:11:52.316Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.317Z] 00:11:52     INFO -   3  mozglue.dll!mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&) [ConditionVariable_windows.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 50]
[task 2023-02-09T00:11:52.317Z] 00:11:52     INFO -      Found by: inlining
[task 2023-02-09T00:11:52.317Z] 00:11:52     INFO -   4  mozglue.dll!mozilla::detail::ConditionVariableImpl::wait_for(mozilla::detail::MutexImpl&, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> const&) [ConditionVariable_windows.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 58 + 0xe]
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -       eip = 0x716d5419    esp = 0x1ebfdf58    ebp = 0x1ebfdf90    ebx = 0x1ebfdfa8
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -       esi = 0x00000000    edi = 0x2134dfa0
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -   5  xul.dll!mozilla::OffTheBooksCondVar::Wait(mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>) [BlockingResourceBase.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 534 + 0x10]
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -       eip = 0x65d028c5    esp = 0x1ebfdf98    ebp = 0x1ebfdfc8    ebx = 0x00000000
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -       esi = 0x056a684c    edi = 0x20703580
[task 2023-02-09T00:11:52.318Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.319Z] 00:11:52     INFO -   6  xul.dll!mozilla::OffTheBooksCondVar::Wait() [BlockingResourceBase.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 514 + 0xb]
[task 2023-02-09T00:11:52.319Z] 00:11:52     INFO -       eip = 0x65d027ff    esp = 0x1ebfdfd0    ebp = 0x1ebfdfd8    ebx = 0x00000080
[task 2023-02-09T00:11:52.319Z] 00:11:52     INFO -       esi = 0x056a684c    edi = 0x20703580
[task 2023-02-09T00:11:52.319Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.320Z] 00:11:52     INFO -   7  xul.dll!mozilla::dom::WorkerPrivate::WaitForWorkerEvents() [WorkerPrivate.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 3865 + 0x9]
[task 2023-02-09T00:11:52.320Z] 00:11:52     INFO -       eip = 0x69914d9b    esp = 0x1ebfdfe0    ebp = 0x1ebfdff4    ebx = 0x00000080
[task 2023-02-09T00:11:52.320Z] 00:11:52     INFO -       esi = 0x056a684c    edi = 0x20703580
[task 2023-02-09T00:11:52.320Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.320Z] 00:11:52     INFO -   8  xul.dll!mozilla::dom::WorkerPrivate::RunCurrentSyncLoop() [WorkerPrivate.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 4323 + 0x6]
[task 2023-02-09T00:11:52.321Z] 00:11:52     INFO -       eip = 0x6991970a    esp = 0x1ebfdffc    ebp = 0x1ebfe028    ebx = 0x00000000
[task 2023-02-09T00:11:52.321Z] 00:11:52     INFO -       esi = 0x056a6800    edi = 0x1154bc80
[task 2023-02-09T00:11:52.321Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.321Z] 00:11:52     INFO -   9  xul.dll!mozilla::dom::AutoSyncLoopHolder::Run() [WorkerPrivate.h:587167c314e2468dbb202f3082c830a4cc531389 : 1531 + 0x4]
[task 2023-02-09T00:11:52.321Z] 00:11:52     INFO -       eip = 0x68924df5    esp = 0x1ebfe030    ebp = 0x1ebfe0d8    ebx = 0x69908b6a
[task 2023-02-09T00:11:52.322Z] 00:11:52     INFO -       esi = 0x1ebfe034    edi = 0x1ebfe138
[task 2023-02-09T00:11:52.322Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.322Z] 00:11:52     INFO -  10  xul.dll!mozilla::dom::WorkerMainThreadRunnable::Dispatch(mozilla::dom::WorkerStatus, mozilla::ErrorResult&) [WorkerRunnable.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 570 + 0x8]
[task 2023-02-09T00:11:52.323Z] 00:11:52     INFO -       eip = 0x69908b6a    esp = 0x1ebfe0e0    ebp = 0x1ebfe198    ebx = 0x1ebfe250
[task 2023-02-09T00:11:52.323Z] 00:11:52     INFO -       esi = 0x0569ea60    edi = 0x00000003
[task 2023-02-09T00:11:52.323Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.323Z] 00:11:52     INFO -  11  xul.dll!mozilla::dom::WorkerThreadProxySyncRunnable::Dispatch(mozilla::dom::WorkerStatus, mozilla::ErrorResult&) [XMLHttpRequestWorker.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 217]
[task 2023-02-09T00:11:52.323Z] 00:11:52     INFO -      Found by: inlining
[task 2023-02-09T00:11:52.324Z] 00:11:52     INFO -  12  xul.dll!mozilla::dom::XMLHttpRequestWorker::Open(nsTSubstring<char> const&, nsTSubstring<char16_t> const&, bool, mozilla::dom::Optional<nsTSubstring<char16_t> > const&, mozilla::dom::Optional<nsTSubstring<char16_t> > const&, mozilla::ErrorResult&) [XMLHttpRequestWorker.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 1755 + 0xc]
[task 2023-02-09T00:11:52.324Z] 00:11:52     INFO -       eip = 0x69b5e33e    esp = 0x1ebfe1a0    ebp = 0x1ebfe1e8    ebx = 0x1ebfe250
[task 2023-02-09T00:11:52.324Z] 00:11:52     INFO -       esi = 0x0569ea60    edi = 0x12448580
[task 2023-02-09T00:11:52.324Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.325Z] 00:11:52     INFO -  13  xul.dll!mozilla::dom::XMLHttpRequestWorker::Open(nsTSubstring<char> const&, nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, mozilla::ErrorResult&) [XMLHttpRequestWorker.h:587167c314e2468dbb202f3082c830a4cc531389 : 114 + 0xf]
[task 2023-02-09T00:11:52.325Z] 00:11:52     INFO -       eip = 0x69b5ffe0    esp = 0x1ebfe1f0    ebp = 0x1ebfe220    ebx = 0x00000000
[task 2023-02-09T00:11:52.325Z] 00:11:52     INFO -       esi = 0x1ebfe250    edi = 0x1ebfe208
[task 2023-02-09T00:11:52.325Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.325Z] 00:11:52     INFO -  14  xul.dll!mozilla::dom::XMLHttpRequest_Binding::open(JSContext*, JS::Handle<JSObject *>, void*, JSJitMethodCallArgs const&) [XMLHttpRequestBinding.cpp: : 1381 + 0x38]
[task 2023-02-09T00:11:52.326Z] 00:11:52     INFO -       eip = 0x67f79712    esp = 0x1ebfe228    ebp = 0x1ebfe47c    ebx = 0x1ebfe494
[task 2023-02-09T00:11:52.326Z] 00:11:52     INFO -       esi = 0x69b5ffa0    edi = 0x1ebfe330
[task 2023-02-09T00:11:52.326Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.326Z] 00:11:52     INFO -  15  xul.dll!mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy,mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [BindingUtils.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 3318 + 0x13]
[task 2023-02-09T00:11:52.327Z] 00:11:52     INFO -       eip = 0x683cc37e    esp = 0x1ebfe484    ebp = 0x1ebfe4dc    ebx = 0x1ebfe4b8
[task 2023-02-09T00:11:52.327Z] 00:11:52     INFO -       esi = 0x6e817598    edi = 0x12448580
[task 2023-02-09T00:11:52.327Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.327Z] 00:11:52     INFO -  16  xul.dll!CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 459 + 0x11]
[task 2023-02-09T00:11:52.327Z] 00:11:52     INFO -       eip = 0x6ce9fa12    esp = 0x1ebfe4e4    ebp = 0x1ebfe518    ebx = 0x129471b0
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -       esi = 0x18878b00    edi = 0x1ebfe690
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -  17  xul.dll!js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 547 + 0xc]
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -       eip = 0x6ce9f50e    esp = 0x1ebfe520    ebp = 0x1ebfe580    ebx = 0x683cc1f0
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -       esi = 0x1ebfe558    edi = 0x18878b00
[task 2023-02-09T00:11:52.328Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.329Z] 00:11:52     INFO -  18  xul.dll!InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 614 + 0xb]
[task 2023-02-09T00:11:52.329Z] 00:11:52     INFO -       eip = 0x6cea03b3    esp = 0x1ebfe588    ebp = 0x1ebfe5a4    ebx = 0x23f7b040
[task 2023-02-09T00:11:52.329Z] 00:11:52     INFO -       esi = 0x18878b00    edi = 0x1ebfe690
[task 2023-02-09T00:11:52.330Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.330Z] 00:11:52     INFO -  19  xul.dll!js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 619]
[task 2023-02-09T00:11:52.330Z] 00:11:52     INFO -      Found by: inlining
[task 2023-02-09T00:11:52.330Z] 00:11:52     INFO -  20  xul.dll!Interpret(JSContext*, js::RunState&) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 3362 + 0x5]
[task 2023-02-09T00:11:52.330Z] 00:11:52     INFO -       eip = 0x6ce96cee    esp = 0x1ebfe5ac    ebp = 0x1ebfe868    ebx = 0x1ebfe7d0
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -       esi = 0x129471c0    edi = 0x23f6d0a0
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -  21  xul.dll!js::RunScript(JSContext*, js::RunState&) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 431 + 0x9]
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -       eip = 0x6ce8e53b    esp = 0x1ebfe870    ebp = 0x1ebfe8e0    ebx = 0x00000000
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -       esi = 0x18878b00    edi = 0x114d7e61
[task 2023-02-09T00:11:52.331Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.332Z] 00:11:52     INFO -  22  xul.dll!js::ExecuteKernel(JSContext*, JS::Handle<JSScript *>, JS::Handle<JSObject *>, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 812 + 0x6]
[task 2023-02-09T00:11:52.332Z] 00:11:52     INFO -       eip = 0x6cea1591    esp = 0x1ebfe8e8    ebp = 0x1ebfe938    ebx = 0x1ebfe990
[task 2023-02-09T00:11:52.332Z] 00:11:52     INFO -       esi = 0x1ebfe8fc    edi = 0x18878b00
[task 2023-02-09T00:11:52.332Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.333Z] 00:11:52     INFO -  23  xul.dll!js::Execute(JSContext*, JS::Handle<JSScript *>, JS::Handle<JSObject *>, JS::MutableHandle<JS::Value>) [Interpreter.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 844 + 0x10]
[task 2023-02-09T00:11:52.333Z] 00:11:52     INFO -       eip = 0x6cea18cb    esp = 0x1ebfe940    ebp = 0x1ebfe968    ebx = 0x18878b00
[task 2023-02-09T00:11:52.333Z] 00:11:52     INFO -       esi = 0x23f07060    edi = 0x00000000
[task 2023-02-09T00:11:52.333Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.333Z] 00:11:52     INFO -  24  xul.dll!EvaluateSourceBuffer(JSContext*, js::ScopeKind, JS::Handle<JSObject *>, JS::ReadOnlyCompileOptions const&, JS::SourceText<mozilla::Utf8Unit>&, JS::MutableHandle<JS::Value>) [CompilationAndEvaluation.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 536]
[task 2023-02-09T00:11:52.334Z] 00:11:52     INFO -      Found by: inlining
[task 2023-02-09T00:11:52.334Z] 00:11:52     INFO -  25  xul.dll!JS::Evaluate(JSContext*, JS::ReadOnlyCompileOptions const&, JS::SourceText<mozilla::Utf8Unit>&, JS::MutableHandle<JS::Value>) [CompilationAndEvaluation.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 544 + 0x301]
[task 2023-02-09T00:11:52.334Z] 00:11:52     INFO -       eip = 0x6be97ad3    esp = 0x1ebfe970    ebp = 0x1ebfea78    ebx = 0x1ebfe9e8
[task 2023-02-09T00:11:52.335Z] 00:11:52     INFO -       esi = 0x18878b00    edi = 0x1ebfe994
[task 2023-02-09T00:11:52.335Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.335Z] 00:11:52     INFO -  26  xul.dll!mozilla::dom::workerinternals::loader::EvaluateSourceBuffer(JSContext*, JS::CompileOptions const&, JS::SourceText<mozilla::Utf8Unit>&) [ScriptLoader.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 462]
[task 2023-02-09T00:11:52.335Z] 00:11:52     INFO -      Found by: inlining
[task 2023-02-09T00:11:52.335Z] 00:11:52     INFO -  27  xul.dll!mozilla::dom::workerinternals::loader::WorkerScriptLoader::EvaluateScript(JSContext*, JS::loader::ScriptLoadRequest*) [ScriptLoader.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 1118 + 0x35]
[task 2023-02-09T00:11:52.336Z] 00:11:52     INFO -       eip = 0x698edb52    esp = 0x1ebfea80    ebp = 0x1ebfeb24    ebx = 0x1ebfeae8
[task 2023-02-09T00:11:52.336Z] 00:11:52     INFO -       esi = 0x1ebfeaf8    edi = 0x18878b00
[task 2023-02-09T00:11:52.336Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.336Z] 00:11:52     INFO -  28  xul.dll!mozilla::dom::workerinternals::loader::WorkerScriptLoader::ProcessPendingRequests(JSContext*) [ScriptLoader.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 818 + 0xa]
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -       eip = 0x698ed699    esp = 0x1ebfeb2c    ebp = 0x1ebfeb50    ebx = 0x21ded500
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -       esi = 0x1c490310    edi = 0x1c49033c
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -  29  xul.dll!mozilla::dom::workerinternals::loader::ScriptExecutorRunnable::ProcessClassicScripts(JSContext*, mozilla::dom::WorkerPrivate*) [ScriptLoader.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 1543 + 0x7]
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -       eip = 0x698f1cf7    esp = 0x1ebfeb58    ebp = 0x1ebfeb78    ebx = 0x21ded500
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -       esi = 0x1cbcf340    edi = 0x00000001
[task 2023-02-09T00:11:52.337Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.338Z] 00:11:52     INFO -  30  xul.dll!mozilla::dom::workerinternals::loader::ScriptExecutorRunnable::WorkerRun(JSContext*, mozilla::dom::WorkerPrivate*) [ScriptLoader.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 1559 + 0xc]
[task 2023-02-09T00:11:52.338Z] 00:11:52     INFO -       eip = 0x698f1de2    esp = 0x1ebfeb80    ebp = 0x1ebfeb90    ebx = 0x698f1da0
[task 2023-02-09T00:11:52.338Z] 00:11:52     INFO -       esi = 0x1cbcf340    edi = 0x056a6800
[task 2023-02-09T00:11:52.338Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.338Z] 00:11:52     INFO -  31  xul.dll!mozilla::dom::WorkerRunnable::Run() [WorkerRunnable.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 377 + 0x18]
[task 2023-02-09T00:11:52.343Z] 00:11:52     INFO -       eip = 0x69923778    esp = 0x1ebfeb98    ebp = 0x1ebfec84    ebx = 0x698f1da0
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -       esi = 0x1cbcf340    edi = 0x056a6800
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -  32  xul.dll!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 1219 + 0xd]
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -       eip = 0x65d2cf39    esp = 0x1ebfec8c    ebp = 0x1ebfede8    ebx = 0x1154bd60
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -       esi = 0x1cbcf340    edi = 0x1154bc80
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -      Found by: call frame info
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -  33  xul.dll!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:587167c314e2468dbb202f3082c830a4cc531389 : 477 + 0x15]
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -       eip = 0x65d32e32    esp = 0x1ebfedf0    ebp = 0x1ebfee0c    ebx = 0x00000000
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -       esi = 0x1154bc80    edi = 0x1154bc80
[task 2023-02-09T00:11:52.344Z] 00:11:52     INFO -      Found by: call frame info
Flags: needinfo?(ystartsev)

yep, that is weird. It should get cleaned up. Normally if we cancel we clear it via CancelMainThread. I will take a look.

Assignee: nobody → ystartsev
Flags: needinfo?(ystartsev)

This is a little more complicated than I thought. The strong ref is released if the worker finishes; in this case, we are never finishing, and we are never cancelling. I can add code to try to shutdown, but if we are still waiting for something that may not work. Are there other tests failing? It looks like there was a crash somewhere triggering this behavior thats since been removed.

This patch conflicts with another recent change.

Jens, is this crash still happening? And if so is there a test case to reproduce it?

Flags: needinfo?(jstutte)

(In reply to Jon Coppeard (:jonco) from comment #4)

This patch conflicts with another recent change.

Jens, is this crash still happening? And if so is there a test case to reproduce it?

It happens sometimes in the wild, it seems, yes. It is probably early to say if there are still cases after that recent change (I would assume it to be unrelated). And if the worker ref has no callback at all, we must be very sure that there are other mechanics that will remove it always when the worker goes away. I am not aware of a testcase.

Flags: needinfo?(jstutte)

Hi :jonco, are you able to take a look here? Thanks

Flags: needinfo?(jcoppeard)

I don't have time to look at this this week.

Crash volume is 9 failures in the last month so this does not look to be high priority.

Assignee: ystartsev → nobody
Severity: -- → S3
Priority: -- → P3

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:yulia, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(ystartsev)
Flags: needinfo?(jcoppeard)

We probably want to have an Initfunction that does all the heavy lifting like adding a StrongWorkerRef and such. Once we have that we can again have a meaningful lambda to react on worker shutdown. With that regard I was thinking if we also should do something like aborting pending executions if any before we TryShutdown.

Flags: needinfo?(jcoppeard)
Assignee: nobody → ystartsev
Status: NEW → ASSIGNED
Attachment #9326686 - Attachment is obsolete: true
Assignee: ystartsev → jstutte
Flags: needinfo?(ystartsev)
Flags: needinfo?(jcoppeard)
Flags: needinfo?(bugmail)
Attachment #9362329 - Attachment description: Bug 1823391 - Have a static WorkerScriptLoader::Create and abort processing when the workerRef is notified. r=#dom-worker-reviewers,yulia → Bug 1823391 - Have a static WorkerScriptLoader::Create and try to shutdown when the workerRef is notified. r=#dom-worker-reviewers,yulia
Flags: needinfo?(bugmail)
Pushed by jstutte@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d12a09b7c773
Have a static WorkerScriptLoader::Create and try to shutdown when the workerRef is notified. r=yulia,edenchuang,asuth
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: