Closed Bug 1817271 Opened 3 years ago Closed 3 years ago

Unable to use WebGPU with `gfx.webgpu.ignore-blocklist`

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox110 --- unaffected
firefox111 --- unaffected
firefox112 --- fixed

People

(Reporter: jkratzer, Assigned: ErichDonGubler)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When trying to use WebGPU in Windows 10 running inside of Virtualbox, I received the WebGPU is disabled by blocklist error. To bypass this, I enabled the gfx.webgpu.ignore-blocklist. However, after doing so, I'm unable to start Firefox as it crashes on startup with the following:

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

r10 = 0x00007ff95a2026a1        r11 = 0x00000074775fc0d0        r12 = 0x0000000000000023
r13 = 0x0000000000000000        r14 = 0x00000074775fc7f0        r15 = 0x0000000800000000
 r8 = 0x00000074775ffae0         r9 = 0x00007ff95a1b0000        rax = 0x00007ff8fe5eede9
rbp = 0x0000000000000000        rbx = 0x00000074775fc778        rcx = 0x00007ff936457dc8
rdi = 0x000001916617e4a0        rdx = 0x0000000000000000        rip = 0x00007ff8f5e520bf
rsi = 0x00007ff8fe5b3a2b        rsp = 0x00000074775fc710
OS|Windows NT|10.0.19044
CPU|amd64|family 6 model 158 stepping 10|4
Crash|EXCEPTION_BREAKPOINT|0x00007ff8f5e520bf|0
0|0|xul.dll|mozilla::gfx::FeatureState::SetUser(mozilla::gfx::FeatureStatus, char const*, nsTSubstring<char> const&)|hg:hg.mozilla.org/mozilla-central:gfx/config/gfxFeature.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|179|0xbf
0|1|xul.dll|mozilla::gfx::FeatureState::UserForceEnable(char const*)|hg:hg.mozilla.org/mozilla-central:gfx/config/gfxFeature.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|97|0x5c
0|2|xul.dll|gfxPlatform::InitWebGPUConfig()|hg:hg.mozilla.org/mozilla-central:gfx/thebes/gfxPlatform.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|2999|0xc0
0|3|xul.dll|gfxPlatform::Init()|hg:hg.mozilla.org/mozilla-central:gfx/thebes/gfxPlatform.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|923|0x77b
0|4|xul.dll|gfxPlatform::InitializeCMS()|hg:hg.mozilla.org/mozilla-central:gfx/thebes/gfxPlatform.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|2110|0xc3
0|5|xul.dll|nsXPLookAndFeel::GetUncachedColor(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins)|hg:hg.mozilla.org/mozilla-central:widget/nsXPLookAndFeel.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|1008|0x1ec
0|6|xul.dll|nsXPLookAndFeel::GetColorValue(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins, unsigned int&)|hg:hg.mozilla.org/mozilla-central:widget/nsXPLookAndFeel.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|988|0xe6
0|7|xul.dll|mozilla::LookAndFeel::GetColor(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins)|hg:hg.mozilla.org/mozilla-central:widget/nsXPLookAndFeel.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|1431|0x48
0|8|xul.dll|mozilla::PreferenceSheet::Prefs::LoadColors(bool)|hg:hg.mozilla.org/mozilla-central:layout/style/PreferenceSheet.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|129|0xda
0|9|xul.dll|mozilla::PreferenceSheet::Prefs::Load(bool)|hg:hg.mozilla.org/mozilla-central:layout/style/PreferenceSheet.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|193|0xd2
0|10|xul.dll|mozilla::PreferenceSheet::Initialize()|hg:hg.mozilla.org/mozilla-central:layout/style/PreferenceSheet.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|234|0x47
0|11|xul.dll|mozilla::ServoStyleSet::ServoStyleSet(mozilla::dom::Document&)|hg:hg.mozilla.org/mozilla-central:layout/style/ServoStyleSet.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|120|0x6e
0|12|xul.dll|mozilla::dom::Document::Init()|hg:hg.mozilla.org/mozilla-central:dom/base/Document.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|2789|0x3de
0|13|xul.dll|nsHTMLDocument::Init()|hg:hg.mozilla.org/mozilla-central:dom/html/nsHTMLDocument.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|143|0x1c
0|14|xul.dll|NS_NewHTMLDocument(mozilla::dom::Document**, bool)|hg:hg.mozilla.org/mozilla-central:dom/html/nsHTMLDocument.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|109|0xcb
0|15|xul.dll|nsContentDLF::CreateBlankDocument(nsILoadGroup*, nsIPrincipal*, nsIPrincipal*, nsDocShell*)|hg:hg.mozilla.org/mozilla-central:layout/build/nsContentDLF.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|215|0x46
0|16|xul.dll|nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal*, nsIPrincipal*, nsIContentSecurityPolicy*, nsIURI*, bool, mozilla::Maybe<nsILoadInfo::CrossOriginEmbedderPolicy> const&, bool, bool, mozilla::dom::WindowGlobalChild*)|hg:hg.mozilla.org/mozilla-central:docshell/base/nsDocShell.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|6780|0x6a5
0|17|xul.dll|nsAppShellService::JustCreateTopWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, bool, mozilla::AppWindow**)|hg:hg.mozilla.org/mozilla-central:xpfe/appshell/nsAppShellService.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|727|0xb0d
0|18|xul.dll|nsAppShellService::CreateTopLevelWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, nsIAppWindow**)|hg:hg.mozilla.org/mozilla-central:xpfe/appshell/nsAppShellService.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|178|0x7b
0|19|xul.dll|nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIOpenWindowInfo*, bool*, nsIWebBrowserChrome**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/startup/nsAppStartup.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|750|0x313
0|20|xul.dll|nsWindowWatcher::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIOpenWindowInfo*, nsIWebBrowserChrome**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|440|0x11d
0|21|xul.dll|nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, nsTSubstring<char> const&, nsTSubstring<char> const&, nsTSubstring<char> const&, bool, bool, bool, nsIArray*, bool, bool, bool, nsPIWindowWatcher::PrintKind, nsDocShellLoadState*, mozilla::dom::BrowsingContext**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|1029|0x32cf
0|22|xul.dll|nsWindowWatcher::OpenWindow(mozIDOMWindowProxy*, nsTSubstring<char> const&, nsTSubstring<char> const&, nsTSubstring<char> const&, nsISupports*, mozIDOMWindowProxy**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|296|0x17f
0|23|xul.dll|XPTC__InvokebyIndex|||0x71
0|24|xul.dll|CallMethodHelper::Call()|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCWrappedNative.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|1179|0x2cf
0|25|xul.dll|XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCWrappedNative.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|1125|0x86
0|26|xul.dll|XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCWrappedNativeJSOps.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|965|0x3f8
0|27|xul.dll|CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|459|0xff
0|28|xul.dll|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|547|0x23a
0|29|xul.dll|Interpret(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|3362|0x83c8
0|30|xul.dll|js::RunScript(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|431|0x24a
0|31|xul.dll|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|579|0x32b
0|32|xul.dll|js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|646|0x122
0|33|xul.dll|JS_CallFunctionValue(JSContext*, JS::Handle<JSObject *>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/vm/CallAndConstruct.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|53|0x299
0|34|xul.dll|nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*)|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCWrappedJSClass.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|918|0xf8c
0|35|xul.dll|PrepareAndDispatch(nsXPTCStubBase*, unsigned int, unsigned long long*, unsigned long long*, double*)|hg:hg.mozilla.org/mozilla-central:xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|168|0x335
0|36|xul.dll|SharedStub|||0x48
0|37|xul.dll|NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*)|hg:hg.mozilla.org/mozilla-central:xpcom/components/nsCategoryManager.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|682|0x822
0|38|xul.dll|nsXREDirProvider::DoStartup()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsXREDirProvider.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|820|0x488
0|39|xul.dll|XREMain::XRE_mainRun()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|5388|0xd9a
0|40|xul.dll|XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|5843|0x8ce
0|41|xul.dll|XRE_main(int, char**, mozilla::BootstrapConfig const&)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|5899|0x97
0|42|firefox.exe|NS_internal_main(int, char**, char**)|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|423|0x42c
0|43|firefox.exe|wmain(int, wchar_t**)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsWindowsWMain.cpp:d07a18cd4ca2c7997da36774e06d7923f2e047ac|167|0x2dc
0|44|firefox.exe|__scrt_common_main_seh()|/builds/worker/workspace/obj-build/browser/app/d:/agent/_work/2/s/src/vctools/crt/vcstartup/src/startup/exe_common.inl|288|0x10b
0|45|kernel32.dll||||
0|46|ntdll.dll||||
0|47|KERNELBASE.dll||||

I think this is almost the same thing as bug 1808985.

Regressions: 1808985
No longer regressions: 1808985
See Also: → 1808985

Likely regressed by bug 1814745.

Regressed by: 1814745

Set release status flags based on info from the regressing bug 1814745

In gfx/config/gfxFeature.{h,cpp}, it can be observed that a mozilla::gfx::FeatureState is
a state machine that collects different "levels" of enabled-ness. To summarize[^1], these are:

  1. Default
  2. User
  3. Environment
  4. Runtime

The rules for initializing each of these layers are basically that:

  1. At least (1) must be initialized, otherwise, the feature is "unused".

  2. Other levels may only be initialized (or re-initialized) if:
    a. All previous levels were initialized.
    b. No subsequent levels are initialized.

    Otherwise, throw an assertion error.

In the bug we're fixing here, we were attempting to configure the environment level before the user
level, which violates rule 2.b. Oops! Make sure we init. the user level before initting the
environment level.

[^1]: You can find a better description of the intent of each layer at https://searchfox.org/mozilla-central/rev/75da1dd5d4b9b991f919a41594194eab93cdef62/gfx/config/gfxFeature.h#147-155.

Assignee: nobody → egubler
Status: NEW → ASSIGNED
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/907392206895 fix ordering of WebGPU feature toggling when blocklisted r=webgpu-reviewers,jimb
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: