Skip to content

flake: Test process crash - agent race tests (unknown failures) #1509

@flake-investigator

Description

@flake-investigator

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:

  • Multiple agent tests reported as “(unknown)” in gotestsum output; test binary exited with 25 failures.

Log snippet:

=== FAIL: agent TestReportConnectionEmpty (unknown)
=== FAIL: agent TestAgent_ImmediateClose (unknown)
=== FAIL: agent TestAgent_Stats_ReconnectingPTY (unknown)
=== FAIL: agent TestAgent_Session_EnvironmentVariables (unknown)
=== FAIL: agent TestAgent_Session_SecretInjection (unknown)
=== FAIL: agent TestAgent_Session_TTY_MOTD (unknown)
=== FAIL: agent TestAgent_Session_TTY_MOTD_Update (unknown)
=== FAIL: agent TestAgent_Session_TTY_QuietLogin/NotLogin (unknown)
=== FAIL: agent TestCheckpoint_CompleteWait (unknown)
=== FAIL: agent TestCheckpoint_CompleteTwice (unknown)
=== FAIL: agent TestOSListeningPortsGetter (unknown)
=== FAIL: agent TestAgent_Stats_SSH (unknown)
=== FAIL: agent TestAgent_StartupScript_SecretInjection (unknown)
=== FAIL: agent TestAgent_GitSSH (unknown)
=== FAIL: agent TestAgent_SessionTTYExitCode (unknown)
=== FAIL: agent TestContextConfigAPI_InitOnce (unknown)
DONE 22796 tests, 61 skipped, 25 failures in 1200.552s
make: *** [Makefile:1419: test-race] Error 1

Root cause classification: Process crash / abrupt test termination in agent package under race tests (multiple “unknown” failures without per-test assertion output).

Race detection evidence:

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

Panic/OOM evidence:

  • No “panic:”, “signal: killed”, or OOM indicators found in the failing job logs.

Precise assignment analysis:

  • Intended: git blame -L <lines> agent/agent_test.go and git blame -L <lines> agent/agent_internal_test.go for failing tests (TestAgent_ImmediateClose/TestReportConnectionEmpty/TestContextConfigAPI_InitOnce).
  • Tooling used instead: github_list_commits for agent/agent_test.go and agent/agent_internal_test.go.
    • Most recent substantive change in agent/agent_test.go: 72f35e1 (Zach) “feat: runtime user secrets injection into workspaces” — touches secret injection/session env tests that are failing.
    • Most recent substantive change in agent/agent_internal_test.go: 3c450899 (Mathias) “fix: pass agent context config explicitly instead of reading env”.
  • Assigning to @zedkipp as the most recent owner of the agent test surface related to the failing secret injection/session tests.

Related issues:

Reproduction (best effort):

  • go test ./agent -race -count=20
  • go test ./agent -run TestAgent_ImmediateClose -race -count=20

Metadata

Metadata

Assignees

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