Closed Bug 1448194 Opened 6 years ago Closed 6 years ago

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

Categories

(Core :: JavaScript Engine, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

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

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

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)
(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: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
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
https://hg.mozilla.org/mozilla-central/rev/be6e3454d8dd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: