-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in AbortSignal.timeout
and aborted
#48951
Labels
abortcontroller
Issues and PRs related to the AbortController API
confirmed-bug
Issues with confirmed bugs.
Comments
1 task
rluvaton
added a commit
to rluvaton/node
that referenced
this issue
Jul 28, 2023
atlowChemi
added
confirmed-bug
Issues with confirmed bugs.
abortcontroller
Issues and PRs related to the AbortController API
labels
Jul 31, 2023
rluvaton
added a commit
to rluvaton/node
that referenced
this issue
Aug 10, 2023
Ceres6
pushed a commit
to Ceres6/node
that referenced
this issue
Aug 14, 2023
Fixes: nodejs#48951 PR-URL: nodejs#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Ceres6
pushed a commit
to Ceres6/node
that referenced
this issue
Aug 14, 2023
Fixes: nodejs#48951 PR-URL: nodejs#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
RafaelGSS
pushed a commit
to RafaelGSS/node
that referenced
this issue
Aug 15, 2023
Fixes: nodejs#48951 PR-URL: nodejs#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
rluvaton
added a commit
to rluvaton/node
that referenced
this issue
Aug 15, 2023
Fixes: nodejs#48951 PR-URL: nodejs#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher
added a commit
to sercher/graaljs
that referenced
this issue
Apr 25, 2024
Fixes: nodejs/node#48951 PR-URL: nodejs/node#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
sercher
added a commit
to sercher/graaljs
that referenced
this issue
Apr 25, 2024
Fixes: nodejs/node#48951 PR-URL: nodejs/node#48952 Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
abortcontroller
Issues and PRs related to the AbortController API
confirmed-bug
Issues with confirmed bugs.
Version
20.5.0,18.16.0
Platform
Darwin razluvaXFX99QJK 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
Subsystem
events
What steps will reproduce the bug?
Run this with the flag
--expose-gc
How often does it reproduce? Is there a required condition?
always.
required conditions are to add the
aborted
after the regular listener and remove the regular listener after the abortedWhat is the expected behavior? Why is that the expected behavior?
no memory leak
What do you see instead?
memory leak
Additional information
this is happening because:
aborted
function add weak listener:node/lib/internal/abort_controller.js
Line 250 in ccdfb37
aborted
function add the listener but as weak listenerremove
on the listener:node/lib/internal/event_target.js
Line 409 in 38dee8a
remove
does not call the removeEventListener which decreases thesize
:node/lib/internal/abort_controller.js
Lines 257 to 259 in ccdfb37
This is also the reason why calling aborted on the same signal and garbage collecting still emit the max listener warning
The text was updated successfully, but these errors were encountered: