Node.js HTTP/2 Client Stream OOM Bug on Close and Destroy
- Investigating(current)
- Trending(upcoming)
- Workaround available(upcoming)
- Resolved(upcoming)
Executive summary
Closing and then destroying an HTTP/2 client stream whose body is still queued fails to send an RST_STREAM frame, causing an infinite loop on empty DATA frames that leads to out-of-memory (OOM) errors.
No verified workaround yet
None of the linked reports describe a mitigation. Follow this incident to hear when one appears.
Official fixWhen a client stream is closed and then destroyed with a queued body, it fails to send an RST_STREAM and enters an infinite loop processing empty DATA frames.
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reporthttp2: closing and then destroying a client stream whose body is still queued sends no RST_STREAM and loops on empty DATA frames until OOM(opens GitHub issue in a new tab)
Version v22.23.4 Platform Linux x64 Subsystem http2 What steps will reproduce the bug? Save as repro.js and run node repro.js (no dependencies). The client runs in a forked child, and the parent kills it at 1 GiB. 'use strict' const http2 = require('node:http2') const fs = require('node:fs') const { fork, execFileSync } = require('node:child_process') // The client runs in a forked child: once the bug triggers, its event loop never runs // again, so the parent watches the child's RSS and kills…
by elyndefigma 0upvotes 1comments
Timeline
- First report on GitHub issue
http2: closing and then destroying a client stream whose body is still queued sends no RST_STREAM and loops on empty DATA frames until OOM
Source