RESOLVED FIXED 201871
AbortSignal does not always emit the abort signal
https://bugs.webkit.org/show_bug.cgi?id=201871
Summary AbortSignal does not always emit the abort signal
Jesse van den Kieboom
Reported 2019-09-17 06:32:03 PDT
This problem occurs in a large code base and I am having trouble setting up a simple reproducible test case outside of our application. It looks like when using an AbortController, calling abort on it may in certain circumstances not emit the abort event on the corresponding signal. It feels like this is problem of premature garbage collection because if I plug the corresponding signal on another object that is kept alive, I do receive the abort event correctly. In addition, the problem in our application does not appear if I use an AbortController/AbortSignal shim (further indicating that this is a problem in the native implementation somehow). I'll try to come up with an isolated test case, but I'm having a hard time doing so.
Attachments
Abort signal appears evicted under GC pressure (649 bytes, text/javascript)
2019-09-17 06:42 PDT, Jesse van den Kieboom
no flags
Patch (14.70 KB, patch)
2019-10-04 07:26 PDT, youenn fablet
no flags
Jesse van den Kieboom
Comment 1 2019-09-17 06:42:26 PDT
Created attachment 378960 [details] Abort signal appears evicted under GC pressure I'm not confident this is the smallest repro case, and it doesn't appear to _always_ reproduce the problem. For me this seems to trigger the issue one out of three times or so.
Alexey Proskuryakov
Comment 2 2019-09-17 13:09:16 PDT
This seems like it's most likely an issue in AbortController, which is not part of WebKit. I think that your hunch is correct, and this is related to garbage collection. So perhaps AbortController needs to protect its properties from collection. Please feel free to re-open if you find evidence of this being a WebKit bug. We'll almost certainly need a reproducible test case to work on this.
Dasa Paddock
Comment 3 2019-09-17 13:30:10 PDT
Can this be reopened with the Component set to WebCore since the code is at: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/AbortController.cpp
Alexey Proskuryakov
Comment 4 2019-09-17 13:37:25 PDT
Apologies, turns out that I didn't know what I was taking about.
Radar WebKit Bug Importer
Comment 5 2019-09-17 13:37:42 PDT
youenn fablet
Comment 6 2019-10-04 07:26:11 PDT
WebKit Commit Bot
Comment 7 2019-10-04 09:31:28 PDT
Comment on attachment 380219 [details] Patch Clearing flags on attachment: 380219 Committed r250727: <https://trac.webkit.org/changeset/250727>
WebKit Commit Bot
Comment 8 2019-10-04 09:31:30 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.