coder / coder/internal

flake: TestAgent_Session_TTY_QuietLogin

Open
#1,509 0 comments 0 reactions 1 assignee Claimed by @mafredri View on GitHub
flake
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

CI Run Link: [https://github.com/coder/coder/actions/runs/25172936672](<>)
Failing Job: [https://github.com/coder/coder/actions/runs/25172936672/job/73797200938](<>) (test-go-race-pg)
Commit: b975262a975375f58647acc2bcc085e473f96848 (Danny Kopping) coder/coder@b975262

Failure summary:

* Go test timed out after 20m in the agent package. The timeout lists TestAgent_Session_TTY_QuietLogin (and subtest Hushlogin) as the running tests; other agent tests show “unknown” as a side effect of the timeout.

Panic/OOM evidence (timeout panic):

```
=== FAIL: agent (0.00s)
panic: test timed out after 20m0s
running tests:
TestAgent_Session_TTY_QuietLogin (20m0s)
TestAgent_Session_TTY_QuietLogin/Hushlogin (19m59s)
```

Additional evidence (goroutine dump shows the test function):

```
goroutine 63 [chan receive, 19 minutes]:
... github.com/coder/coder/v2/agent_test.TestAgent_Session_TTY_QuietLogin(0xc0007b9180)
... /home/runner/work/coder/coder/agent/agent_test.go:954
```

Root cause classification: Process timeout / hang (Go test timed out while running TestAgent_Session_TTY_QuietLogin).

Race detection evidence:

* No “WARNING: DATA RACE” / “race detected during execution of test” lines found in the failing job logs.

Precise assignment analysis:

* Test location: agent/agent_test.go:912+ (TestAgent_Session_TTY_QuietLogin).
* Unable to run git blame here; used recent commits on agent/agent_test.go instead.
* Most recent change in agent/agent_test.go: 72f35e1 (Zach / zedkipp) adds TestAgent_Session_SecretInjection, not directly touching QuietLogin.
* Most relevant TTY session hang fix: c60a3568 (Mathias / mafredri) added timeouts around session.Wait in TTY test helpers and reduced timing sensitivity after similar hangs.
* TestAgent_Session_TTY_QuietLogin/Hushlogin still calls session.Wait() directly (no timeout), matching the failure mode. Assigning to @mafredri given recent ownership of TTY hang mitigation.

Related issues:

* coder/internal#1417 (flake: TestAgent_Session_TTY_MOTD_Update) — closed, similar hang mitigation work by mafredri.
* [#604]() (flake: TestAgent_ImmediateClose) — closed, included data race evidence; none found here.
* coder/internal#1441 (flake: Data race in agent - TestAgent_Reconnect) — closed, different race evidence.

Reproduction (best effort):

* go test ./agent -race -run TestAgent_Session_TTY_QuietLogin -count=20
* go test ./agent -race -count=20

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.