-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
dgramIssues and PRs related to the dgram subsystem / UDP.Issues and PRs related to the dgram subsystem / UDP.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.
Description
- Version: 4.4.2
- Platform: Linux (Ubuntu Server 8 - Jessie), kernel 3.16
- Subsystem: dgram.js
UDP sockets seem to have a memory leak. Seems that it's not the first time it had that, so it feels to me that it might be a regression. The following test code reproduces it:
const Crypto = require('crypto');
const Dgram = require('dgram');
let socket = Dgram.createSocket('udp4');
setInterval(() => {
for (let i = 0; i < 30; i++) {
socket.send(Crypto.randomBytes(50), 0, 50, 8125, 'example.org');
}
}, 10);Memory grows approximately at a rate of 1 MB/s in my machine. I assume that a UDP socket should just send the data (no matter if no one is listening on the other side), so there should not be this huge memory consumption.
jjmaestro and punnerud
Metadata
Metadata
Assignees
Labels
dgramIssues and PRs related to the dgram subsystem / UDP.Issues and PRs related to the dgram subsystem / UDP.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.