Closed Bug 1808985 Opened 1 year ago Closed 1 year ago

Assertion failure: !mEnvironment.IsInitialized(), at /builds/worker/checkouts/gecko/gfx/config/gfxFeature.cpp:179

Categories

(Core :: Graphics: WebGPU, defect, P1)

defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox-esr102 --- disabled
firefox109 --- disabled
firefox110 --- disabled
firefox111 --- fixed

People

(Reporter: tsmith, Assigned: jimb)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, Whiteboard: [fuzzblocker])

Attachments

(1 file)

This happens when trying to launch on some machines with --headless and gfx.webgpu.force-enabled=true.

stderr:

[1969971, Unnamed thread 55d6c7527180] WARNING: XPCOM object Mutex constructed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:215
[1969971, Unnamed thread 55d6c7527180] WARNING: XPCOM object nsDequeBase constructed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:215
[1969971, Unnamed thread 55d6c7527180] WARNING: XPCOM object nsDeque constructed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:215
*** You are running in headless mode.
[2023-01-06T21:48:41Z WARN  rkv::backend::impl_safe::environment] `load_ratio()` is irrelevant for this storage backend.
[Parent 1969971, Main Thread] WARNING: Failed to parse GL version!: file /builds/worker/checkouts/gecko/widget/gtk/GfxInfo.cpp:299
[Parent 1969971, Main Thread] WARNING: Failed to detect GL vendor!: file /builds/worker/checkouts/gecko/widget/gtk/GfxInfo.cpp:370
Assertion failure: !mEnvironment.IsInitialized(), at /builds/worker/checkouts/gecko/gfx/config/gfxFeature.cpp:179
#0 0x2904b579be3 in mozilla::gfx::FeatureState::SetUser(mozilla::gfx::FeatureStatus, char const*, nsTSubstring<char> const&) /builds/worker/checkouts/gecko/gfx/config/gfxFeature.cpp:179:3
#1 0x2904b576db4 in mozilla::gfx::FeatureState::UserForceEnable(char const*) /builds/worker/checkouts/gecko/gfx/config/gfxFeature.cpp:97:3
#2 0x2904b2ba15d in gfxPlatform::InitWebGPUConfig() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:2985:13
#3 0x2904b2a8c58 in gfxPlatform::Init() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:924:14
#4 0x2904b2a823f in gfxPlatform::GetPlatform() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:462:5
#5 0x2904b2ac3ec in gfxPlatform::InitializeCMS() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:2107:9
#6 0x2904b475d3f in gfxPlatform::EnsureCMSInitialized() /builds/worker/workspace/obj-build/dist/include/gfxPlatform.h:962:7
#7 0x2904b454714 in gfxPlatform::GetCMSMode() /builds/worker/workspace/obj-build/dist/include/gfxPlatform.h:517:5
#8 0x290510f4b4e in nsXPLookAndFeel::GetUncachedColor(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins) /builds/worker/checkouts/gecko/widget/nsXPLookAndFeel.cpp:1006:9
#9 0x290510f491e in nsXPLookAndFeel::GetColorValue(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins, unsigned int&) /builds/worker/checkouts/gecko/widget/nsXPLookAndFeel.cpp:986:17
#10 0x290510f7398 in mozilla::LookAndFeel::GetColor(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins) /builds/worker/checkouts/gecko/widget/nsXPLookAndFeel.cpp:1429:47
#11 0x29051073a37 in mozilla::LookAndFeel::Color(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins, unsigned int) /builds/worker/workspace/obj-build/dist/include/mozilla/LookAndFeel.h:447:12
#12 0x29051092bf2 in mozilla::widget::GetAccentColor(bool, mozilla::ColorScheme) /builds/worker/checkouts/gecko/widget/ThemeColors.cpp:91:7
#13 0x2905108a986 in mozilla::widget::ThemeColors::RecomputeAccentColors() /builds/worker/checkouts/gecko/widget/ThemeColors.cpp:195:20
#14 0x2905108a799 in mozilla::widget::Theme::LookAndFeelChanged() /builds/worker/checkouts/gecko/widget/Theme.cpp:182:3
#15 0x2905108a74e in mozilla::widget::Theme::Init() /builds/worker/checkouts/gecko/widget/Theme.cpp:171:3
#16 0x290510f3747 in nsXPLookAndFeel::GetInstance() /builds/worker/checkouts/gecko/widget/nsXPLookAndFeel.cpp:406:3
#17 0x290510f7900 in mozilla::LookAndFeel::GetThemeInfo(nsTSubstring<char>&) /builds/worker/checkouts/gecko/widget/nsXPLookAndFeel.cpp:1542:3
#18 0x29048b0ac87 in nsSystemInfo::Init() /builds/worker/checkouts/gecko/xpcom/base/nsSystemInfo.cpp:1081:5
#19 0x29048bf4444 in mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /builds/worker/workspace/obj-build/xpcom/components/StaticComponents.cpp:10514:7
#20 0x29048c220ec in mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /builds/worker/workspace/obj-build/xpcom/components/StaticComponents.cpp:13030:10
#21 0x29048c4b257 in (anonymous namespace)::EntryWrapper::CreateInstance(nsID const&, void**) /builds/worker/checkouts/gecko/xpcom/components/nsComponentManager.cpp:184:46
#22 0x29048c443e8 in nsComponentManagerImpl::GetServiceLocked(mozilla::Maybe<mozilla::detail::BaseMonitorAutoLock<mozilla::Monitor>>&, (anonymous namespace)::EntryWrapper&, nsID const&, void**) /builds/worker/checkouts/gecko/xpcom/components/nsComponentManager.cpp:975:17
#23 0x29048c44a31 in nsComponentManagerImpl::GetService(mozilla::xpcom::ModuleID, nsID const&, void**) /builds/worker/checkouts/gecko/xpcom/components/nsComponentManager.cpp:1065:10
#24 0x29048c230ed in mozilla::xpcom::GetServiceHelper::operator()(nsID const&, void**) const /builds/worker/workspace/obj-build/xpcom/components/StaticComponents.cpp:13172:50
#25 0x29048ac1c87 in nsCOMPtr_base::assign_from_helper(nsCOMPtr_helper const&, nsID const&) /builds/worker/checkouts/gecko/xpcom/base/nsCOMPtr.cpp:109:7
#26 0x29048ba1d04 in nsCOMPtr<nsISupports>::nsCOMPtr(nsCOMPtr_helper const&) /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:999:5
#27 0x2904a4f9d48 in xpc::GetServiceImpl(JSContext*, mozilla::xpcom::JSServiceEntry const&, JS::MutableHandle<JSObject*>, mozilla::ErrorResult&) /builds/worker/checkouts/gecko/js/xpconnect/src/JSServices.cpp:83:32
#28 0x2904a4f98f0 in xpc::GetService(JSContext*, mozilla::xpcom::JSServiceEntry const&, mozilla::ErrorResult&) /builds/worker/checkouts/gecko/js/xpconnect/src/JSServices.cpp:130:8
#29 0x2904a4f8fdd in xpc::Services_Resolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool*) /builds/worker/checkouts/gecko/js/xpconnect/src/JSServices.cpp:153:25
#30 0x29055f60437 in js::CallResolveOp(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyKey>, js::PropertyResult*) /builds/worker/checkouts/gecko/js/src/vm/NativeObject-inl.h:626:8
#31 0x29055ef8e2e in bool js::NativeLookupOwnPropertyInline<(js::AllowGC)1, (js::LookupResolveMode)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, js::PropertyResult*) /builds/worker/checkouts/gecko/js/src/vm/NativeObject-inl.h:738:14
#32 0x29055eff04d in bool NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2176:10
#33 0x29055efef54 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2224:10
#34 0x29055b56242 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:118:10
#35 0x29055b56012 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:125:10
#36 0x29055c17071 in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:4720:10
#37 0x29055c27018 in GetPropertyOperation(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:245:10
#38 0x29055c03788 in Interpret(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:3017:12
#39 0x29055bfa5b1 in js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:431:13
#40 0x29055c1242e in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:579:13
#41 0x29055c12f1e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:614:10
#42 0x29055c130d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:646:8
#43 0x29055c13f66 in js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:768:10
#44 0x29055f61774 in CallGetter(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, js::PropertyInfoBase<unsigned int>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2017:12
#45 0x29055efe9d6 in bool GetExistingProperty<(js::AllowGC)1>(JSContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, js::PropertyInfoBase<unsigned int>, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2045:12
#46 0x29055eff1ed in bool NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2193:14
#47 0x29055efef54 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2224:10
#48 0x29055b56242 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:118:10
#49 0x29055b56012 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:125:10
#50 0x29055c17071 in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:4720:10
#51 0x29055c27018 in GetPropertyOperation(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:245:10
#52 0x29055c03788 in Interpret(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:3017:12
#53 0x29055bfa5b1 in js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:431:13
#54 0x29055c1242e in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:579:13
#55 0x29055c12f1e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:614:10
#56 0x29055c130d3 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:646:8
#57 0x29055d20e20 in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/CallAndConstruct.cpp:53:10
#58 0x2904a543391 in nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) /builds/worker/checkouts/gecko/js/xpconnect/src/XPCWrappedJSClass.cpp:918:17
#59 0x29048cfff44 in PrepareAndDispatch /builds/worker/checkouts/gecko/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:115:37
#60 0x29048cfef92 in SharedStub xptcstubs_x86_64_linux.cpp
#61 0x29048c4000b in NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/xpcom/components/nsCategoryManager.cpp:682:19
#62 0x290558d2550 in nsXREDirProvider::DoStartup() /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:958:11
#63 0x290558b02c3 in XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5522:18
#64 0x290558b231e in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5977:8
#65 0x290558b290e in XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6033:21
#66 0x290558c8dd6 in mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12
#67 0x55d6c67b9c25 in do_main(int, char**, char**) /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:226:22
#68 0x55d6c67b94ae in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:429:16

A Pernosco session is available here: https://pernos.co/debug/DfLVu23BrH2z7FFDMXEG4Q/index.html

Whiteboard: [fuzzblocker]

This crash occurs if gfxPlatform::InitWebGPUConfig's call to gfxPlatform::IsGfxInfoStatusOkay returns false. Passing --headless doesn't make that happen for me, but if I tweak it to fail, then I can reproduce the crash.

Initializing a graphics pref is supposed to go through a specific life cycle, as Firefox takes into account defaults, user settings, environmental factors, and runtime overrides. It seems like InitWebGPUConfig isn't following that ordering: it's trying to call FeatureState::UserForceEnable (user settings) after FeatureState::Disable (runtime overrides).

S3 because WebGPU is not enabled by default. P1 because it's a fuzzblocker.

Assignee: nobody → jimb
Severity: -- → S3
Priority: -- → P1

This bug prevents fuzzing from making progress; however, it has low severity. It is important for fuzz blocker bugs to be addressed in a timely manner (see here why?).
:jimb, could you increase the severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jimb)
  1. It's got a patch, I'm just waiting for the soft freeze
  2. WebGPU is not enabled by default.
Flags: needinfo?(jimb)
Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9040bddfad1b
Check for force-enabled WebGPU in the proper order. r=jrmuizel
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Regressed by: 1817271
No longer regressed by: 1817271
See Also: → 1817271
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: