-
Notifications
You must be signed in to change notification settings - Fork 0
flake: Data race in coderd/x/chatd - TestWaitAgentNonComputerUseNoRecording #1450
Copy link
Copy link
Closed
Labels
Description
CI Failure Information
- CI Run Link: https://github.com/coder/coder/actions/runs/23913072322
- Job: test-go-race-pg (job ID: 69741734295)
- Commit: 17dec2a70f2c757d4689382ae77bb8cf6b71d877 — "feat: agents desktop recordings backend (#23894)" by Hugo Dutka
Failure Details
- Package:
coderd/x/chatd - Primary failing test:
TestWaitAgentNonComputerUseNoRecording - Additional failures in same package:
TestSubscribeNoPubsubNoDuplicateMessageParts,TestWaitAgentComputerUseRecording,TestWaitAgentNonComputerUseNoRecording, plus multiple chatd unit tests that failed after the race detector fired.
Race detector evidence:
WARNING: DATA RACE
Write at 0x00c003c274b8 by goroutine 105:
github.com/coder/coder/v2/coderd/x/chatd.TestWaitAgentNonComputerUseNoRecording()
/home/runner/work/coder/coder/coderd/x/chatd/recording_internal_test.go:225 +0x5f8
github.com/coder/coder/v2/coderd/x/chatd.createParentChildChats()
/home/runner/work/coder/coder/coderd/x/chatd/subagent_internal_test.go:780 +0x2db
Previous read at 0x00c003c274b8 by goroutine 15002:
github.com/coder/coder/v2/coderd/x/chatd.(*Server).processOnce()
/home/runner/work/coder/coder/coderd/x/chatd/chatd.go:2517 +0x8ee
testing.go:1617: race detected during execution of test
Root Cause Analysis
- Go race detector flagged a data race in
coderd/x/chatdduring wait_agent recording tests. - The race is between the test path (
TestWaitAgentNonComputerUseNoRecording) and chatd server processing (Server.processOnce). - The race causes the
test-go-race-pgjob to fail with multiple chatd test failures after the first race is detected.
Assignment Analysis
git log --oneline --follow coderd/x/chatd/recording_internal_test.go17dec2a7(Hugo Dutka) — added/updated the wait_agent recording tests.
- The race is detected inside
TestWaitAgentNonComputerUseNoRecordingin this file, so assigning to the most recent substantive author: @hugodutka.
Related Issues
- No matching issues found in
coder/internalafter searching:TestWaitAgentNonComputerUseNoRecordingWARNING: DATA RACE+chatdrace detected during execution of test+chatd
Reproduction
go test ./coderd/x/chatd -run TestWaitAgentNonComputerUseNoRecording -race -count=1
Reactions are currently unavailable