In a script/cibuild run with -race added locally to script/test, internal/cli failed with panic: test timed out after 10m0s; the only test still running was TestRemoveIgnoresTerminalOnStdout, at 9m52s. It happened in one of four runs, while measuring #125, which changes only the build. The verbose rerun passed, so the build stayed green; that part is #32.
The test reads what secret rm shows on the terminal with io.ReadAll(ptmx), which ends only once nothing holds the terminal open any more, and nothing limits how long that read can take. The test's one-minute context killed secret rm, yet the read went on for nine more minutes: something still held the terminal open, or the killed process had not exited. In the goroutine dump the test is blocked in that read, and os/exec is waiting to report the kill to a cmd.Wait() the test never reaches.
Definition of done
The cause is found and fixed in the test or the code, not hidden by a shorter timeout, a retry or a skip.
When the test's context ends, the test fails at once and names the hang, rather than waiting for Go's test timeout.
TestRemoveAsksAtTerminalOnStdin, which reads the terminal the same way, is checked for the same defect.
Model: opus-5-5
In a `script/cibuild` run with `-race` added locally to `script/test`, `internal/cli` failed with `panic: test timed out after 10m0s`; the only test still running was `TestRemoveIgnoresTerminalOnStdout`, at 9m52s. It happened in one of four runs, while measuring https://git.eeqj.de/sneak/secret/pulls/125, which changes only the build. The verbose rerun passed, so the build stayed green; that part is https://git.eeqj.de/sneak/secret/issues/32.
The test reads what `secret rm` shows on the terminal with `io.ReadAll(ptmx)`, which ends only once nothing holds the terminal open any more, and nothing limits how long that read can take. The test's one-minute context killed `secret rm`, yet the read went on for nine more minutes: something still held the terminal open, or the killed process had not exited. In the goroutine dump the test is blocked in that read, and `os/exec` is waiting to report the kill to a `cmd.Wait()` the test never reaches.
## Definition of done
- The cause is found and fixed in the test or the code, not hidden by a shorter timeout, a retry or a skip.
- When the test's context ends, the test fails at once and names the hang, rather than waiting for Go's test timeout.
- `TestRemoveAsksAtTerminalOnStdin`, which reads the terminal the same way, is checked for the same defect.
Model: opus-5-5
Cause: pty.Open of github.com/creack/pty v1.1.24 sometimes opens /dev/pts/0 instead of the terminal it created, because it hands the kernel a stale address when Go moves the goroutine's stack. secret rm then wrote to that other terminal, and the test waited on a terminal no program had open. #127 pins the library's fixed commit and makes both terminal tests stop reading when their one-minute context ends, failing with a message that says what was still waiting.
Side effect of the old code worth knowing: wherever /dev/pts/0 is someone's terminal, a test run could print secret rm's message there.
Model: opus-5-5
Cause: `pty.Open` of `github.com/creack/pty` v1.1.24 sometimes opens `/dev/pts/0` instead of the terminal it created, because it hands the kernel a stale address when Go moves the goroutine's stack. `secret rm` then wrote to that other terminal, and the test waited on a terminal no program had open. https://git.eeqj.de/sneak/secret/pulls/127 pins the library's fixed commit and makes both terminal tests stop reading when their one-minute context ends, failing with a message that says what was still waiting.
Side effect of the old code worth knowing: wherever `/dev/pts/0` is someone's terminal, a test run could print `secret rm`'s message there.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In a
script/cibuildrun with-raceadded locally toscript/test,internal/clifailed withpanic: test timed out after 10m0s; the only test still running wasTestRemoveIgnoresTerminalOnStdout, at 9m52s. It happened in one of four runs, while measuring #125, which changes only the build. The verbose rerun passed, so the build stayed green; that part is #32.The test reads what
secret rmshows on the terminal withio.ReadAll(ptmx), which ends only once nothing holds the terminal open any more, and nothing limits how long that read can take. The test's one-minute context killedsecret rm, yet the read went on for nine more minutes: something still held the terminal open, or the killed process had not exited. In the goroutine dump the test is blocked in that read, andos/execis waiting to report the kill to acmd.Wait()the test never reaches.Definition of done
TestRemoveAsksAtTerminalOnStdin, which reads the terminal the same way, is checked for the same defect.Model: opus-5-5
Cause:
pty.Openofgithub.com/creack/ptyv1.1.24 sometimes opens/dev/pts/0instead of the terminal it created, because it hands the kernel a stale address when Go moves the goroutine's stack.secret rmthen wrote to that other terminal, and the test waited on a terminal no program had open. #127 pins the library's fixed commit and makes both terminal tests stop reading when their one-minute context ends, failing with a message that says what was still waiting.Side effect of the old code worth knowing: wherever
/dev/pts/0is someone's terminal, a test run could printsecret rm's message there.Model: opus-5-5