Intermittent GECKO(1433) | Assertion failure: CanDecodeOffThread(cx, options, range.length()), at /builds/worker/workspace/build/src/js/src/jsapi.cpp:4343

RESOLVED FIXED in Firefox 61

Status

()

defect
P5
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: intermittent-bug-filer, Assigned: nbp)

Tracking

({intermittent-failure})

unspecified
mozilla61
Points:
---

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

Comment hidden (Intermittent Failures Robot)
Comment hidden (Intermittent Failures Robot)
ScriptLoader::AttemptAsyncScriptCompile() checks JS::CanDecodeOffThread() [1] before calling JS::DecodeOffThreadScript() [2], but at [1] the value of |ScriptLoadRequest::mBytecodeOffset| is ignored, whereas the failing assertion includes |mBytecodeOffset| when calling JS::CanDecodeOffThread() [3].

@nbp: Does that sound like plausible explanation for this assertion error?


[1] https://searchfox.org/mozilla-central/rev/b80994a43e5d92c2f79160ece176127eed85dcc9/dom/script/ScriptLoader.cpp#1803
[2] https://searchfox.org/mozilla-central/rev/b80994a43e5d92c2f79160ece176127eed85dcc9/dom/script/ScriptLoader.cpp#1830-1834
[3] https://searchfox.org/mozilla-central/rev/b80994a43e5d92c2f79160ece176127eed85dcc9/js/src/jsapi.cpp#4334-4335
Flags: needinfo?(nicolas.b.pierron)
Assignee

Comment 4

a year ago
(In reply to André Bargull [:anba] from comment #3)
> ScriptLoader::AttemptAsyncScriptCompile() checks JS::CanDecodeOffThread()
> [1] before calling JS::DecodeOffThreadScript() [2], but at [1] the value of
> |ScriptLoadRequest::mBytecodeOffset| is ignored, whereas the failing
> assertion includes |mBytecodeOffset| when calling JS::CanDecodeOffThread()
> [3].
> 
> @nbp: Does that sound like plausible explanation for this assertion error?

Yes, Good catch!

mBytecodeOffset is set to the size of the SRI data, which is only a few bytes compared to the 367 kB expected.

You can potentially reproduce this precise error by changing one of the JS files loaded by dom/base/test/test_script_loader_js_cache.html test case, and appending characters to a dummy comment at the end of one of the file.
Flags: needinfo?(nicolas.b.pierron)
Attachment #8964950 - Flags: review?(mrbkap) → review+
Assignee

Updated

a year ago
Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED

Comment 6

a year ago
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/be6e3454d8dd
Substract the mBytecodeOffset from the bytecode length, as this could cause some assertion failures. r=mrbkap

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/be6e3454d8dd
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment hidden (Intermittent Failures Robot)
You need to log in before you can comment on or make changes to this bug.