Skip to content

Stream memory leak in 20.11.1 #51936

Closed
Closed
@kshaa

Description

@kshaa

Version

v20.11.1

Platform

Linux xxx SMP PREEMPT Tue Jan 9 09:56:30 CST 2024 aarch64 aarch64 aarch64 GNU/Linux (Debian-based distribution)

Subsystem

No response

What steps will reproduce the bug?

Using winston with multiple custom transports and a lot of logger instances. Also requires a fairly large volume of logs being produced.

How often does it reproduce? Is there a required condition?

Seems to happen every time we run our code.
Doesn't happen on v20.10.0, this bug requires node > v20.10.0.
We tested and changing the UV_USE_IO_URING value doesn't fix the bug (it seems to trade CPU usage vs RAM leak, but performance has regressed either way).

What is the expected behavior? Why is that the expected behavior?

Memory leak does not happen when logging huge volume of logs. It's expected because it used to be that way before upgrading from v20.10.0 to v20.11.1 (and IO_URING disabling doesn't seem to be at fault).

What do you see instead?

Here's a RAM consumption graph from a staging environment where we reproduced the memory leak.
The first three runs with memory leaks in this graph are when running on stock NodeJS v20.11.1.
The last two runs are run with a custom NodeJS built from v20.11.1 source by reverting commit dd52068.
Screenshot from 2024-03-01 17-47-49
Screenshot from 2024-03-01 17-51-25

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions