-
-
Notifications
You must be signed in to change notification settings - Fork 689
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
A memory leak occurs when frequently aborting fetch requests.
Reproducible By
Run the following code in Node.js.
import undici from "undici";
(function attack() {
const controller = new AbortController();
undici.fetch(
"http://idonotexist:9999",
{signal: controller.signal}
).catch(attack);
controller.abort();
}());In less than a minute, I see memory usage of the Node.js process climb to several gigabytes.
Expected Behavior
Memory usage to remain stable, as is the case when you comment out the controller.abort(); statement.
Environment
$ uname -a
Darwin MacBook-Pro.local 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 arm Darwin
$ node -v
v20.4.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working