Repository navigation
Internal Assertion in AbortSignal #54601
Description
Activity
- addedabortcontrollerIssues and PRs related to the AbortController and AbortSignal APIs.Issues and PRs related to the AbortController and AbortSignal APIs.
on Aug 28, 2024 Dependent abort signal that allow one or more 'AbortSignal' object to depend on each other
the dependent signal will automatically aborted if the parent is aborted . So the links explains the behavior that AbortSignal should behave like that but it fails assertion when signal has already been aborted .
Looks like you can test the case by skipping the signal if aborted or check if the signal is aborted creating an exception handler
this 2 case can be tested to see if the impact and early test if we modification can be made to this
if you have any other way please discuss?
@redyetidevI'm sorry, I'm not exactly following your comment, could you elaborate?
The issue, to clarify, is that in internal assertion is thrown in a place where a signal should be returned (to be WPT compliant).
Reacted by Shubham Singh Sugara- addedweb-standardsIssues and PRs related to web-platform APIs and standards compliance.Issues and PRs related to web-platform APIs and standards compliance.
on Aug 30, 2024 😞 Sorry for that i meant this:
What is understood
A dependent abort signal is designed so that when the parent signal is aborted, the dependent signal should automatically follow suit. The DOM specification outlines this behavior, but it seems that Node.js currently fails this internal assertion when a signal has already been aborted.
Solution we can try ?
One possible way to address this would be to check if the signal has been aborted before attempting to create a dependent signal. If it has, we could skip it or handle it with an exception. This would help ensure compliance with the WPT. We could start by testing these approaches to see if they resolve the issue.If you have any other suggestions or ideas on how to ensure WPT compliance while avoiding this assertion, I'd love to discuss them!
Reacted by Aviv KellerAhh okay. If you have an idea/improvement, opening a PR is a great way to contribute
Reacted by Shubham Singh Sugarayeah , thanks will try to open one for this
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.and removed
on Sep 10, 2024 - added a commit that references this issue
on Oct 4, 2024
I am working on updating the Web Platform Tests in #54468, but ran into an issue occuring with
AbortSignal. I narrowed down the issue to a minimal reproduction, with leads to anERR_INTERNAL_ASSERTION:The failed assertion is
node/lib/internal/abort_controller.js
Line 253 in 885692a
It seems to me that Node.js's current behavior is to fail the assertion when a signal has already aborted, however the WPT's expected behavior is that "Dependent signals for AbortSignal.any() are marked aborted before abort events fire":
https://github.com/web-platform-tests/wpt/blob/e78446e34a1921371658a5df08c71d83f50a2a2f/dom/abort/resources/abort-signal-any-tests.js#L193