Skip to content

Use containerd-style stdin closer instead of exponential backoff stdin close #208

@danail-branekov

Description

@danail-branekov

In order to address containerd processes hanging forever when stdin is provided (see here and here), we are closing the stdin of a process immediately after we start it.

We have recently realised that this might not be the best solution as there might be a user process that sleeps for a while and then starts reading from stdin. We suspect that such a process would never get the stdin contents as stdin would be closed at the time the process reads from it.
We should probably implement something similar to what containerd does in their stdin closer that is a wrapper over stdin that closes it whenever EOF is reached.

Some concerns though:

  • Is it really true that a process that reads from stdin a while after being started would not get stdin content (as stdin has been closed)
  • If we used the stdin closer, what would happen if a process is provided with stdin but never cares to read from stdin? Would it hang forever as stdin is never closed as EOF is never reached?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions