Assertion failure: !sourceSignal->Aborted() && !sourceSignal->Dependent(), at /builds/worker/checkouts/gecko/dom/abort/AbortSignal.cpp:294
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: tsmith, Assigned: saschanaz)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: assertion, regression, testcase, Whiteboard: [bugmon:bisected,confirmed], [wptsync upstream])
Attachments
(3 files)
Found while fuzzing m-c 20240610-9e49a1b86e40 (--enable-debug --enable-fuzzing)
To reproduce via Grizzly Replay:
$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>
Assertion failure: !sourceSignal->Aborted() && !sourceSignal->Dependent(), at /builds/worker/checkouts/gecko/dom/abort/AbortSignal.cpp:294
#0 0x785e3f6ec55c in mozilla::dom::AbortSignal::Any(mozilla::dom::GlobalObject&, mozilla::dom::Sequence<mozilla::OwningNonNull<mozilla::dom::AbortSignal>> const&) /builds/worker/checkouts/gecko/dom/abort/AbortSignal.cpp:294:9
#1 0x785e3fd5c26e in mozilla::dom::AbortSignal_Binding::any(JSContext*, unsigned int, JS::Value*) /builds/worker/workspace/obj-build/dom/bindings/./AbortSignalBinding.cpp:179:57
#2 0x785e445380e4 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:487:13
#3 0x785e445378cf in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:581:12
#4 0x785e4506bc36 in js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICFallbackStub*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/jit/BaselineIC.cpp:1670:10
#5 0x1d5669d9aa5e ([anon:js-executable-memory]+0xba5e)
Comment 1•1 year ago
|
||
Verified bug as reproducible on mozilla-central 20240619213942-7999d1a5d574.
The bug appears to have been introduced in the following build range:
Start: 2437c2ca5bec35fe4ab02eb938e0e02457cd079b (20240123142542)
End: f3efca74da0f43269bd8ac07e2a5d27e89c4d7c3 (20240123145016)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2437c2ca5bec35fe4ab02eb938e0e02457cd079b&tochange=f3efca74da0f43269bd8ac07e2a5d27e89c4d7c3
Comment 2•1 year ago
|
||
:vhilla, since you are the author of the regressor, bug 1830781, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1830781
Comment 4•1 year ago
•
|
||
Another testcase to check whether the created signal will still be aborted despite the assertion not holding.
<script>
let b;
window.addEventListener("DOMContentLoaded", () => {
let a = new AbortController()
b = AbortSignal.any([a.signal])
let c;
a.signal.addEventListener("abort", () => {
c = AbortSignal.any([b])
console.log(b.aborted, a.signal.aborted);
})
a.abort();
setTimeout(() => setTimeout(() => {
console.log(c.aborted);
}, 0), 0);
})
</script>
As c
still becomes aborted, I do not think there is any impact to users and the severity is low.
What happens is that we abort the signal which sets a
to aborted, then fires an event.
During the event handler, a
is aborted but b
is not - same in Chrome. Therefore, we create a dependent signal c
via AbortSignal::Any
(this check is passed), which expects that if b
is not aborted, a
also is not and therefore we get an assertion failure.
As this is a debug assertion, in release, c
is still created as a dependent signal on the already aborted a
. Though as a
did not yet abort the signal dependent on it all is good and c
gets aborted.
The code above has the same output in Firefox and Chrome, I expect the control flow is the same and also what the spec expects. So I would say this is a spec issue, maybe firing of the event and aborting of dependent signals should be switched in order.
Updated•1 year ago
|
Assignee | ||
Comment 5•10 months ago
|
||
Taking this bug. Thank you for the great investigation and the previous implementation, Vincent!
Assignee | ||
Updated•10 months ago
|
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 8•10 months ago
|
||
Updated•10 months ago
|
Updated•10 months ago
|
Comment 12•10 months ago
|
||
Comment 14•10 months ago
•
|
||
Backed out for causing wpt failures in cache-abort.https.any.html.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | /service-workers/cache-storage/cache-abort.https.any.sharedworker.html | add() on an already-aborted request should reject with AbortError - promise_rejects_dom: add should reject function "function() { throw e }" threw object "TypeError: NetworkError when attempting to fetch resource." that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
Also, please be aware about these wpt failures. For those ones, there's a patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1903676#c11.
Comment 15•10 months ago
|
||
Comment 16•10 months ago
|
||
Assignee | ||
Comment 17•10 months ago
|
||
The patches are relanded by sheriffs, let's fix this in bug 1917150.
Comment 18•10 months ago
|
||
bugherder |
Comment 20•10 months ago
|
||
Verified bug as fixed on rev mozilla-central 20240906093607-9df162c80958.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.
Updated•10 months ago
|
Updated•10 months ago
|
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Description
•