Skip to content

flake: Data race in coderd - TestInboxNotification_Watch/TestInboxNotifications_List/TestTasks #1600

@flake-investigator

Description

@flake-investigator

CI Failure Details

CI Run Link: https://github.com/coder/coder/actions/runs/27654006303
Failed Job: https://github.com/coder/coder/actions/runs/27654006303/job/81784301170 (test-go-race-pg)

Commit Info:

  • SHA: 744c00f45ce781949695c56e408aa9ba31fb2f70
  • Author: Asher
  • Date: 2026-06-16T23:05:27Z
  • Commit title: fix: handle blank dynamic parameter values consistently (#26122)

Failure Output (race detector)

Job logs show multiple coderd tests failing with race detection:

=== FAIL: coderd TestInboxNotification_Watch/Failure_Modes (0.00s)
    testing.go:1712: race detected during execution of test
--- FAIL: TestInboxNotification_Watch/Failure_Modes (0.00s)

=== FAIL: coderd TestInboxNotifications_List/Failure_Modes (0.00s)
    testing.go:1712: race detected during execution of test
--- FAIL: TestInboxNotifications_List/Failure_Modes (0.00s)

=== FAIL: coderd TestTasks/UpdateInput (0.00s)
    testing.go:1712: race detected during execution of test
--- FAIL: TestTasks/UpdateInput (0.00s)

Additional tests in the same window were also marked failed after the race detector tripped:

  • TestWorkspaceAgentRecreateDevcontainer
  • TestProvisionerJobs/ProvisionerJobs (no assertion output visible in the sampled log)

Race Detection Evidence

Only testing.go:1712: race detected during execution of test lines are present in the logs. I scanned the failure window for WARNING: DATA RACE stack traces but none were emitted in this run, so the exact goroutine/variable is unknown.

Root Cause Assessment

Classification: Data race (Go race detector). Multiple coderd tests were marked failed after the race detector tripped, but without a stack trace the precise shared state is unknown.

Panic/OOM Checks

Searched the job logs around the failure window for panic:, out of memory, signal: killed, and other crash indicators — none found.

Assignment Analysis

Failing tests are in:

  • coderd/inboxnotifications_test.go
    • TestInboxNotification_Watch (line ~33)
    • TestInboxNotifications_List (line ~367)
  • coderd/aitasks_test.go
    • TestTasks/UpdateInput (line ~1262)

Intended blame commands:

  • git blame -L 33,140 coderd/inboxnotifications_test.go
  • git blame -L 367,460 coderd/inboxnotifications_test.go
  • git blame -L 1262,1340 coderd/aitasks_test.go

Tooling limitation: line-level blame isn’t available here, so I used recent file history as a proxy.

Recent file history (proxy):

  • git log --oneline -10 --follow coderd/inboxnotifications_test.go
    • Most recent meaningful test-focused change: b39477c0 ("fix: resolve flakey inbox tests") by Danielle Maywood
  • git log --oneline -10 --follow coderd/aitasks_test.go
    • Most recent change: 75f5b60 ("fix: return 409 Conflict instead of 502 when task agent is busy") by Mathias Fredriksson

Because the earliest failing tests are in inboxnotifications_test.go and the race stack is missing (multiple tests affected), assignment is somewhat uncertain. Assigning to @DanielleMaywood as the most recent meaningful modifier of the inbox notification tests; please reassign if another component owner is more appropriate.

Related Issues

  • flake: TestTasks #1320 (flake: TestTasks) — closed, different failure mode (no race evidence).
  • No open issues found for this exact race signature after searching: "TestInboxNotification_Watch", "TestInboxNotifications_List", "TestTasks/UpdateInput", "race detected".

Reproduction (best effort)

go test ./coderd -run 'TestInboxNotification_Watch|TestInboxNotifications_List|TestTasks/UpdateInput' -race -count=1

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions