Skip to content

Possible pipeline deadlock #39005

Closed
Closed
@ronag

Description

@ronag

From reviewing the code I notice the following:

https://github.com/nodejs/node/blob/master/lib/internal/streams/pipeline.js#L116

    for await (const chunk of iterable) {
      if (!writable.write(chunk)) {
        if (writable.destroyed) return;
        await EE.once(writable, 'drain');
      }
    }

In particular the following:

await EE.once(writable, 'drain');

writable might never emit 'drain' or 'error', instead only 'close' might be emitted. A bit unfortunate but that's how streams work.

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