Skip to content

Node 24.0.2: Memory leak on fetch response .text()  #58380

@JMPSequeira

Description

@JMPSequeira

Version

24.0.2

Platform

Microsoft Windows NT 10.0.26100.0 x64

Subsystem

No response

What steps will reproduce the bug?

const response = await fetch(url);
const text = await response.text();

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

I detected the leak in a script with succeeding fetch calls (40/s).
After 10000 requests, or so, the script terminated with code 134.
Windows logs report EventName RADAR_PRE_LEAK_64.
I identified the source to await response.text().
I tried different alternatives to fetch:

  • undici
  • node-fetch
  • https
    But the leak persisted.

This may only affect arm64 systems, not sure if only windows 11. There are very few discussions about this anywhere and this comment

Following the comment I downgraded to lts 22.15.1 and the memory leak is slower to develop but it still creeps in.

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

No memory leak.

What do you see instead?

Memory leak.

Additional information

Processor Snapdragon(R) X - X126100 - Qualcomm(R) Oryon(TM) CPU, 2956 Mhz, 8 Core(s), 8 Logical Processor(s)
BIOS Version/Date Insyde UX3407QA.305, 10/01/2025

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions