You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
undici leaking Symbol to global space in 18.2 (but not 18.1) #43157
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
I'll try to come up with a narrower test case later (unless someone finds the issue before then), but running tests for https://github.com/Trott/solr-proxy in 18.2.0 results in a report that Symbol(undici.globalDispatcher.1) is leaked. Running the same test with Node.js 18.1.0 does not report that.
Aren't we supposed to detect leaked globals in the Node.js CI?
We probably only test for actual globals and not global symbols. Does V8 even provide an API to get a list of global/shared symbols (created via Symbol.for())?
Aren't we supposed to detect leaked globals in the Node.js CI?
We currently only test for enumerable globals, for some reason. I've #42056 open that should address this, but it's still blocked on nodejs/build#2879.
As the undici.globalDispatcher.1 symbol is used by people now (we mention it as a workaround in a couple of places in the bug tracker) I don't think we can - or want to - remove it again, at least not until #43187 is done, and even then a grace period is needed.
I'll go ahead and close this but please reopen if needed.
Activity
climba03003 commentedon May 20, 2022
I think it is true that the
symbolis added to global because it allow the support of sharedglobal dispatcherbetweennodeandundici.It is added #43059
https://github.com/nodejs/undici/blob/d023b2d808169b7269307d2546125b780e7be5ad/lib/global.js#L5-L27
targos commentedon May 20, 2022
Aren't we supposed to detect leaked globals in the Node.js CI?
mscdex commentedon May 20, 2022
We probably only test for actual globals and not global symbols. Does V8 even provide an API to get a list of global/shared symbols (created via
Symbol.for())?Trott commentedon May 20, 2022
The check is in
test/common/index.js. I'm guessing that it would miss a symbol, though.node/test/common/index.js
Lines 266 to 368 in 26846a0
aduh95 commentedon May 21, 2022
We currently only test for enumerable globals, for some reason. I've #42056 open that should address this, but it's still blocked on nodejs/build#2879.
bnoordhuis commentedon Aug 1, 2023
As the
undici.globalDispatcher.1symbol is used by people now (we mention it as a workaround in a couple of places in the bug tracker) I don't think we can - or want to - remove it again, at least not until #43187 is done, and even then a grace period is needed.I'll go ahead and close this but please reopen if needed.