CompileError when using WASM exceptions in audio worklet
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
relnote-firefox | --- | 117+ |
firefox-esr102 | --- | unaffected |
firefox-esr115 | --- | unaffected |
firefox117 | + | verified |
firefox118 | + | verified |
firefox119 | + | verified |
People
(Reporter: gilles.piou, Assigned: rhunt)
References
(Regressed 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
395.37 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release+
|
Details | Review |
Steps to reproduce:
- Go on https://www.bandlab.com/
- In the console:
(new AudioContext()).audioWorklet.addModule('https://www.bandlab.com/web-app/common/workers/libaudioengine-837fbc5d51.js')
Actual results:
CompileError: at offset 7983: exceptions not enabled
Expected results:
I expect the WASM module to be initialized without any error.
The error started to occur over the weekend, with many BandLab users reporting the same problem. I have switched back to a WASM module compiled without the support for exceptions for now.
I re-installed Firefox 116 on macOS, and it seems to work fine using that version. Is there any changes related to WASM and WASM exception in Firefox 117 that could cause this problem?
Reporter | ||
Comment 1•1 year ago
|
||
Took the screenshot while using 118.0b4 (64-bit), but the error is reproducible on the stable channel.
Comment 2•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript: WebAssembly' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•1 year ago
|
||
Maybe a regression from bug 1832378?
Wasm uses context options. I wonder if we're missing a call to xpc::SetPrefableContextOptions
for worklets.
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
Yeah, I think the issue here is that Worklets don't read from Preferences to set ContextOptions and rely on the default field initializers (which changed slightly in bug 1832378). We also have testing for features that are enabled, but those don't run in worklets.
Simplest fix here is to get the default field initializers to be correct. However we really should have worklets reading from prefs too, otherwise we don't have the ability to unship proposals via pref if we need to.
Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Set release status flags based on info from the regressing bug 1832378
Assignee | ||
Comment 6•1 year ago
|
||
WorkletThread does not read from preferences to initialize JS::ContextOptions
and relies on the default values it has. This lead to a regression from
bug 1832378 where certain wasm features had their field's default change.
This didn't affect other globals because we read preferences from those
and so the default value is ignored.
This commit fixes the default value for wasm features in JS::ContextOptions
as a temporary fix, and adds a quick test in worklets.
Ideally worklets will read from preferences for consistency and to allow
us to force enable/disable features. But that's a bigger change.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Mind filing a Worklet bug for the missing call to SetPrefableContextOptions
? I think we should fix that soon before we accidentally ship something in worklets.
Comment 8•1 year ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #7)
Mind filing a Worklet bug for the missing call to
SetPrefableContextOptions
? I think we should fix that soon before we accidentally ship something in worklets.
Bug 1851854 is filed. Looking at WorkletThread::EnsureCycleCollectedJSContext row of FIXME
, there must be another similar bug.
Comment 10•1 year ago
|
||
bugherder |
Assignee | ||
Comment 11•1 year ago
|
||
Comment on attachment 9351853 [details]
Bug 1851468 - wasm: Set ContextOptions defaults to help consumers that don't read preferences. r?yury,#dom-workers-and-storage-reviewers
Beta/Release Uplift Approval Request
- User impact if declined: Sites using Wasm exception-handling and in audio worklets will no longer work.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch just changes the feature flag so that wasm exception-handling is enabled in worklets.
- String changes made/needed:
- Is Android affected?: Yes
Comment 12•1 year ago
|
||
Comment on attachment 9351853 [details]
Bug 1851468 - wasm: Set ContextOptions defaults to help consumers that don't read preferences. r?yury,#dom-workers-and-storage-reviewers
Approved for 118.0b7, thanks.
Comment 13•1 year ago
|
||
uplift |
Comment 14•1 year ago
|
||
bugherder uplift |
Comment 15•1 year ago
|
||
Comment on attachment 9351853 [details]
Bug 1851468 - wasm: Set ContextOptions defaults to help consumers that don't read preferences. r?yury,#dom-workers-and-storage-reviewers
Approved for 117.0.1.
Updated•1 year ago
|
Comment 16•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 17•1 year ago
|
||
Added to the 117.0.1 release notes:
Fixed audio worklets not working for sites using WebAssembly exception handling
Updated•1 year ago
|
Comment 18•1 year ago
|
||
I have reproduced this issue on Windows 10 with Nightly v119.0a1 (2023-09-04) (64-bit) and verified the fix in Nightly v119.0a1 (2023-09-09) (64-bit), Beta v118.0b7 and Dot Release v117.0.1, On Windows 10, Ubuntu 22 and Mac OS 11. The compile error is no longer showing in the web console.
Reporter | ||
Comment 19•1 year ago
|
||
Thank you so much for the quick turnaround! BandLab Studio works fine with the latest version of Firefox ✅
Description
•