You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running nix build inside a gvisor container, I intermittently see the following error:
error:
… while waiting for the build environment for '/nix/store/58w946lldvwmy4isl79lz1vnl5qh23ls-sandbox-env.drv' to initialize (succeeded, previous messages: )
error: reading a line: Input/output error
From gvisor's strace I see that the cause of this error is a read from /dev/pts/ptmx that returns EIO. EIO is an expected error that occurs when the slave closes the file descriptor.
When the code to use a pty was first added (#2878), special handling of EIO was also added. But it appears that the code for reading the output was later refactored to use readLine without taking into account the possibility of EIO.
Steps To Reproduce
I don't have a straightforward reproduction. I suspect that gvisor may be slower or otherwise have slightly different behavior that significantly increases the chance of this error occurring.
However, the cause seems clear and shouldn't require a reproduction.
Activity
devpts: do not hang up master before its replica is opened
devpts: do not hang up master before its replica is opened
devpts: do not hang up master before its replica is opened
devpts: do not hang up master before its replica is opened
devpts: do not hang up master before its replica is opened
devpts: do not hang up master before its replica is opened (#17244)
devpts: do not hang up master before its replica is opened (#17244)