Files
mattgodbolt-moltyandClaude Fable 5 62b96ce7b9 Fix hang and uncaught exception when conan download is severed mid-stream
A library package download whose connection died mid-transfer left
downloadAndExtractPackage's promise permanently unsettled: the error was
emitted on the un-listened Readable.from() wrapper (pipe() neither
attaches nor forwards error handlers), crashing via uncaughtException
("TypeError: terminated") while gunzip/tar never saw an error or finish.
The never-settling promise wedged a compilation queue slot forever,
which in turn permanently disabled temp dir cleanup and filled the disk
on a production instance (see #8811).

Use stream.pipeline() throughout, which propagates errors through every
stage and guarantees settlement, and per-entry pipeline for file writes
so write errors also propagate (via extract.destroy) instead of being
dropped.

The new test reproduces the production failure exactly against the old
code: an unhandled "TypeError: terminated" plus a promise that never
settles.

Fixes part of #8811.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 11:51:06 -05:00
..
2021-10-05 01:45:05 +02:00
2019-08-21 01:26:16 +02:00
2025-01-29 10:41:03 -06:00
2021-09-13 20:22:27 +02:00
2024-10-27 15:28:38 +02:00
2024-10-26 17:42:22 +02:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2026-02-08 12:50:20 +01:00
2024-03-08 22:25:09 -06:00
2024-03-08 22:25:09 -06:00
2025-07-28 10:34:46 -05:00