Open Bug 1880427 Opened 9 months ago Updated 9 months ago

ClientWebGLContext::CreateHostContext may better check ProcessChild::ExpectingShutdown

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

defect

Tracking

()

People

(Reporter: jstutte, Unassigned)

References

(Blocks 2 open bugs)

Details

I encountered on my system the following two (identical) crashes:

The full stack goes like:

 	ntdll.dll!NtWaitForAlertByThreadId()	Unbekannt
 	ntdll.dll!RtlSleepConditionVariableSRW()	Unbekannt
 	KERNELBASE.dll!SleepConditionVariableSRW()	Unbekannt
 	[Inlineframe] mozglue.dll!mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl & lock) Zeile 50	C++
 	mozglue.dll!mozilla::detail::ConditionVariableImpl::wait_for(mozilla::detail::MutexImpl & lock, const mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> & rel_time) Zeile 58	C++
 	[Inlineframe] xul.dll!mozilla::OffTheBooksCondVar::Wait(mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> aDuration) Zeile 65	C++
 	[Inlineframe] xul.dll!mozilla::Monitor::Wait(mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> aDuration) Zeile 39	C++
 	xul.dll!mozilla::ipc::MessageChannel::WaitForSyncNotify() Zeile 857	C++
 	[Inlineframe] xul.dll!mozilla::ipc::MessageChannel::Send(mozilla::UniquePtr<IPC::Message,mozilla::DefaultDelete<IPC::Message>> aMsg, mozilla::UniquePtr<IPC::Message,mozilla::DefaultDelete<IPC::Message>> * aReply) Zeile 1343	C++
 	xul.dll!mozilla::ipc::IProtocol::ChannelSend(mozilla::UniquePtr<IPC::Message,mozilla::DefaultDelete<IPC::Message>> aMsg, mozilla::UniquePtr<IPC::Message,mozilla::DefaultDelete<IPC::Message>> * aReply) Zeile 523	C++
 	xul.dll!mozilla::dom::PWebGLChild::SendInitialize(const mozilla::webgl::InitContextDesc & desc, mozilla::webgl::InitContextResult * res) Zeile 107	C++
 	[Inlineframe] xul.dll!mozilla::ClientWebGLContext::CreateHostContext::<lambda_6>::operator()() Zeile 888	C++
>	xul.dll!mozilla::ClientWebGLContext::CreateHostContext(const mozilla::avec2<unsigned int> & requestedSize) Zeile 827	C++
 	xul.dll!mozilla::ClientWebGLContext::SetDimensions(int signedWidth, int signedHeight) Zeile 799	C++
 	xul.dll!mozilla::dom::CanvasRenderingContextHelper::UpdateContext(JSContext * aCx, JS::Handle<JS::Value> aNewContextOptions, mozilla::ErrorResult & aRvForDictionaryInit) Zeile 282	C++
 	xul.dll!mozilla::dom::HTMLCanvasElement::UpdateContext(JSContext * aCx, JS::Handle<JS::Value> aNewContextOptions, mozilla::ErrorResult & aRvForDictionaryInit) Zeile 561	C++
 	xul.dll!mozilla::dom::CanvasRenderingContextHelper::GetOrCreateContext(JSContext * aCx, mozilla::dom::CanvasContextType aContextType, JS::Handle<JS::Value> aContextOptions, mozilla::ErrorResult & aRv) Zeile 235	C++
 	xul.dll!mozilla::dom::CanvasRenderingContextHelper::GetOrCreateContext(JSContext * aCx, const nsTSubstring<char16_t> & aContextId, JS::Handle<JS::Value> aContextOptions, mozilla::ErrorResult & aRv) Zeile 201	C++
 	[Inlineframe] xul.dll!mozilla::dom::HTMLCanvasElement::GetContext(JSContext * aCx, const nsTSubstring<char16_t> & aContextId, JS::Handle<JS::Value> aContextOptions, mozilla::ErrorResult & aRv) Zeile 1072	C++
 	xul.dll!mozilla::dom::HTMLCanvasElement_Binding::getContext(JSContext * cx, JS::Handle<JSObject *> obj, void * void_self, const JSJitMethodCallArgs & args) Zeile 292	C++
 	xul.dll!mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy,mozilla::dom::binding_detail::ThrowExceptions>(JSContext * cx, unsigned int argc, JS::Value * vp) Zeile 3258	C++
 	00000266c43903b1()	Unbekannt
 	00000266c43b9fda()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c42ab303()	Unbekannt
 	00000266c43b4ae5()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c4031538()	Unbekannt
 	[Inlineframe] xul.dll!EnterJit(JSContext * cx, js::RunState & state, unsigned char * code) Zeile 115	C++
 	xul.dll!js::jit::MaybeEnterJit(JSContext * cx, js::RunState & state) Zeile 261	C++
 	xul.dll!js::Interpret(JSContext * cx, js::RunState & state) Zeile 3101	C++
 	[Inlineframe] xul.dll!MaybeEnterInterpreterTrampoline(JSContext * cx, js::RunState & state) Zeile 394	C++
 	[Inlineframe] xul.dll!js::RunScript(JSContext * cx, js::RunState & state) Zeile 452	C++
 	[Inlineframe] xul.dll!js::InternalCallOrConstruct(JSContext * cx, const JS::CallArgs & args, js::MaybeConstruct construct, js::CallReason reason) Zeile 606	C++
 	[Inlineframe] xul.dll!InternalCall(JSContext * cx, const js::AnyInvokeArgs & args, js::CallReason reason) Zeile 641	C++
 	xul.dll!js::Call(JSContext * cx, JS::Handle<JS::Value> fval, JS::Handle<JS::Value> thisv, const js::AnyInvokeArgs & args, JS::MutableHandle<JS::Value> rval, js::CallReason reason) Zeile 673	C++
 	[Inlineframe] xul.dll!js::jit::InvokeFunction(JSContext * cx, JS::Handle<JSObject *> obj, bool constructing, bool ignoresReturnValue, unsigned int argc, JS::Value * argv, JS::MutableHandle<JS::Value> rval) Zeile 545	C++
 	xul.dll!js::jit::InvokeFromInterpreterStub(JSContext * cx, js::jit::InterpreterStubExitFrameLayout * frame) Zeile 569	C++
 	00000266c4031af5()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c43549c3()	Unbekannt
 	00000266c4344119()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c4031538()	Unbekannt
 	[Inlineframe] xul.dll!EnterJit(JSContext * cx, js::RunState & state, unsigned char * code) Zeile 115	C++
 	xul.dll!js::jit::MaybeEnterJit(JSContext * cx, js::RunState & state) Zeile 261	C++
 	xul.dll!js::Interpret(JSContext * cx, js::RunState & state) Zeile 3101	C++
 	[Inlineframe] xul.dll!MaybeEnterInterpreterTrampoline(JSContext * cx, js::RunState & state) Zeile 394	C++
 	[Inlineframe] xul.dll!js::RunScript(JSContext * cx, js::RunState & state) Zeile 452	C++
 	[Inlineframe] xul.dll!js::InternalCallOrConstruct(JSContext * cx, const JS::CallArgs & args, js::MaybeConstruct construct, js::CallReason reason) Zeile 606	C++
 	[Inlineframe] xul.dll!InternalCall(JSContext * cx, const js::AnyInvokeArgs & args, js::CallReason reason) Zeile 641	C++
 	xul.dll!js::Call(JSContext * cx, JS::Handle<JS::Value> fval, JS::Handle<JS::Value> thisv, const js::AnyInvokeArgs & args, JS::MutableHandle<JS::Value> rval, js::CallReason reason) Zeile 673	C++
 	[Inlineframe] xul.dll!js::jit::InvokeFunction(JSContext * cx, JS::Handle<JSObject *> obj, bool constructing, bool ignoresReturnValue, unsigned int argc, JS::Value * argv, JS::MutableHandle<JS::Value> rval) Zeile 545	C++
 	xul.dll!js::jit::InvokeFromInterpreterStub(JSContext * cx, js::jit::InterpreterStubExitFrameLayout * frame) Zeile 569	C++
 	00000266c4031af5()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c4297361()	Unbekannt
 	00000266c403b30f()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c42ca7f0()	Unbekannt
 	00000266c403b30f()	Unbekannt
 	00000266c40312d5()	Unbekannt
 	00000266c4031538()	Unbekannt
 	[Inlineframe] xul.dll!EnterJit(JSContext * cx, js::RunState & state, unsigned char * code) Zeile 115	C++
 	xul.dll!js::jit::MaybeEnterJit(JSContext * cx, js::RunState & state) Zeile 261	C++
 	xul.dll!js::Interpret(JSContext * cx, js::RunState & state) Zeile 3101	C++
 	[Inlineframe] xul.dll!MaybeEnterInterpreterTrampoline(JSContext * cx, js::RunState & state) Zeile 394	C++
 	[Inlineframe] xul.dll!js::RunScript(JSContext * cx, js::RunState & state) Zeile 452	C++
 	[Inlineframe] xul.dll!js::InternalCallOrConstruct(JSContext * cx, const JS::CallArgs & args, js::MaybeConstruct construct, js::CallReason reason) Zeile 606	C++
 	[Inlineframe] xul.dll!InternalCall(JSContext * cx, const js::AnyInvokeArgs & args, js::CallReason reason) Zeile 641	C++
 	xul.dll!js::Call(JSContext * cx, JS::Handle<JS::Value> fval, JS::Handle<JS::Value> thisv, const js::AnyInvokeArgs & args, JS::MutableHandle<JS::Value> rval, js::CallReason reason) Zeile 673	C++
 	xul.dll!JS::Call(JSContext * cx, JS::Handle<JS::Value> thisv, JS::Handle<JS::Value> fval, const JS::HandleValueArray & args, JS::MutableHandle<JS::Value> rval) Zeile 119	C++
 	xul.dll!mozilla::dom::IdleRequestCallback::Call(mozilla::dom::BindingCallContext & cx, JS::Handle<JS::Value> aThisVal, mozilla::dom::IdleDeadline & deadline, mozilla::ErrorResult & aRv) Zeile 453	C++
 	[Inlineframe] xul.dll!mozilla::dom::IdleRequestCallback::Call(mozilla::dom::IdleDeadline & deadline, mozilla::ErrorResult & aRv, const char * aExecutionReason, mozilla::dom::CallbackObject::ExceptionHandling aExceptionHandling, JS::Realm * aRealm) Zeile 397	C++
 	[Inlineframe] xul.dll!mozilla::dom::IdleRequestCallback::Call(mozilla::dom::IdleDeadline & deadline, const char * aExecutionReason) Zeile 410	C++
 	xul.dll!mozilla::dom::IdleRequest::IdleRun(nsPIDOMWindowInner * aWindow, double aDeadline, bool aDidTimeout) Zeile 57	C++
 	xul.dll!nsGlobalWindowInner::RunIdleRequest(mozilla::dom::IdleRequest * aRequest, double aDeadline, bool aDidTimeout) Zeile 728	C++
 	xul.dll!IdleRequestTimeoutHandler::Call(const char *) Zeile 778	C++
 	xul.dll!nsGlobalWindowInner::RunTimeoutHandler(mozilla::dom::Timeout * aTimeout, nsIScriptContext * aScx) Zeile 6325	C++
 	xul.dll!mozilla::dom::TimeoutManager::RunTimeout(const mozilla::TimeStamp & aNow, const mozilla::TimeStamp & aTargetDeadline, bool aProcessIdle) Zeile 879	C++
 	xul.dll!mozilla::dom::TimeoutExecutor::MaybeExecute() Zeile 179	C++
 	xul.dll!mozilla::dom::TimeoutExecutor::Notify(nsITimer * aTimer) Zeile 248	C++
 	[Inlineframe] xul.dll!nsTimerImpl::Fire::<lambda_12>::operator()(const nsCOMPtr<nsITimerCallback> & i) Zeile 677	C++
 	[Inlineframe] xul.dll!mozilla::detail::VariantImplementation<unsigned char,1,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback>::matchN(mozilla::Variant<nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback> &) Zeile 309	C++
 	[Inlineframe] xul.dll!mozilla::detail::VariantImplementation<unsigned char,0,nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback>::matchN(mozilla::Variant<nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback> & aV, nsTimerImpl::Fire::<lambda_11> && aMi, nsTimerImpl::Fire::<lambda_12> && aMs, nsTimerImpl::Fire::<lambda_13> && aMs, nsTimerImpl::Fire::<lambda_14> && aMs, nsTimerImpl::Fire::<lambda_15> && aMs) Zeile 318	C++
 	[Inlineframe] xul.dll!mozilla::Variant<nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback>::matchN(mozilla::Variant<nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback> & aVariant, nsTimerImpl::Fire::<lambda_11> && aM0, nsTimerImpl::Fire::<lambda_12> && aM1, nsTimerImpl::Fire::<lambda_13> && aMs, nsTimerImpl::Fire::<lambda_14> && aMs, nsTimerImpl::Fire::<lambda_15> && aMs) Zeile 902	C++
 	[Inlineframe] xul.dll!mozilla::Variant<nsTimerImpl::UnknownCallback,nsCOMPtr<nsITimerCallback>,nsCOMPtr<nsIObserver>,nsTimerImpl::FuncCallback,nsTimerImpl::ClosureCallback>::match(nsTimerImpl::Fire::<lambda_11> && aM0, nsTimerImpl::Fire::<lambda_12> && aM1, nsTimerImpl::Fire::<lambda_13> && aMs, nsTimerImpl::Fire::<lambda_14> && aMs, nsTimerImpl::Fire::<lambda_15> && aMs) Zeile 857	C++
 	[Inlineframe] xul.dll!nsTimerImpl::Fire(int aGeneration) Zeile 675	C++
 	xul.dll!nsTimerEvent::Run() Zeile 515	C++
 	[Inlineframe] xul.dll!mozilla::ThrottledEventQueue::Inner::ExecuteRunnable() Zeile 254	C++
 	xul.dll!mozilla::ThrottledEventQueue::Inner::Executor::Run() Zeile 81	C++
 	[Inlineframe] xul.dll!mozilla::RunnableTask::Run() Zeile 578	C++
 	xul.dll!mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(const mozilla::detail::BaseAutoLock<mozilla::Mutex &> & aProofOfLock) Zeile 905	C++
 	[Inlineframe] xul.dll!mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(const mozilla::detail::BaseAutoLock<mozilla::Mutex &> & aProofOfLock) Zeile 728	C++
 	xul.dll!mozilla::TaskController::ProcessPendingMTTask(bool aMayWait) Zeile 514	C++
 	[Inlineframe] xul.dll!mozilla::TaskController::TaskController::<lambda_6>::operator()() Zeile 235	C++
 	[Inlineframe] xul.dll!mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:235:7'>::Run() Zeile 548	C++
 	[Inlineframe] xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Zeile 1199	C++
 	xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Zeile 480	C++
 	xul.dll!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate * aDelegate) Zeile 107	C++
 	[Inlineframe] xul.dll!MessageLoop::RunInternal() Zeile 370	C++
 	xul.dll!MessageLoop::RunHandler() Zeile 364	C++
 	[Inlineframe] xul.dll!MessageLoop::Run() Zeile 345	C++
 	xul.dll!nsBaseAppShell::Run() Zeile 148	C++
 	xul.dll!nsAppShell::Run() Zeile 822	C++
 	[Inlineframe] xul.dll!XRE_RunAppShell() Zeile 721	C++
 	xul.dll!mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate * aDelegate) Zeile 235	C++
 	[Inlineframe] xul.dll!MessageLoop::RunInternal() Zeile 370	C++
 	xul.dll!MessageLoop::RunHandler() Zeile 364	C++
 	[Inlineframe] xul.dll!MessageLoop::Run() Zeile 345	C++
 	[Inlineframe] xul.dll!XRE_InitChildProcess(int aArgc, char * * aArgv, const XREChildData * aChildData) Zeile 656	C++
 	xul.dll!mozilla::BootstrapImpl::XRE_InitChildProcess(int argc, char * * argv, const XREChildData * aChildData) Zeile 67	C++
 	[Inlineframe] firefox.exe!content_process_main(mozilla::Bootstrap * bootstrap, int argc, char * * argv) Zeile 57	C++
 	[Inlineframe] firefox.exe!NS_internal_main(int argc, char * * argv, char * * envp) Zeile 375	C++
 	firefox.exe!wmain(int argc, wchar_t * * argv) Zeile 151	C++
 	[Inlineframe] firefox.exe!invoke_main() Zeile 90	C++
 	firefox.exe!__scrt_common_main_seh() Zeile 288	C++
 	kernel32.dll!BaseThreadInitThunk()	Unbekannt
 	ntdll.dll!RtlUserThreadStart()	Unbekannt

There might be various levels on this stack where we could better check if we are asked to shutdown, but ClientWebGLContext::CreateHostContext should probably refuse to even try to work after ProcessChild::ExpectingShutdown() ?

See Also: → 1880438
See Also: 1880438
Blocks: 1880819

There might also be a case here for avoiding sync IPC.

The severity field is not set for this bug.
:jgilbert, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jgilbert)
Severity: -- → S3
Flags: needinfo?(jgilbert)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.