coder / coder

Provision remote development environments via Terraform
https://coder.com
GNU Affero General Public License v3.0
7.74k stars 641 forks source link

goleak: `TestHeartbeat` #13816

Closed dannykopping closed 1 month ago

dannykopping commented 1 month ago

https://github.com/coder/coder/actions/runs/9840724458/job/27165631310

=== FAIL: coderd/provisionerdserver  (0.00s)
PASS
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 97 in state chan send, with github.com/coder/coder/v2/coderd/provisionerdserver_test.TestHeartbeat.func1 on top of the stack:
github.com/coder/coder/v2/coderd/provisionerdserver_test.TestHeartbeat.func1({0x2d7e228, 0xc00042c9a0})
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver_test.go:108 +0xb3
github.com/coder/coder/v2/coderd/provisionerdserver.(*server).heartbeat(0xc0001b6000, {0x2d7e228, 0xc00042c9a0})
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:275 +0x89
github.com/coder/coder/v2/coderd/provisionerdserver.(*server).heartbeatLoop(0xc0001b6000)
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:253 +0x309
created by github.com/coder/coder/v2/coderd/provisionerdserver.NewServer in goroutine 63
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:224 +0x13b4
]
FAIL    github.com/coder/coder/v2/coderd/provisionerdserver 20.786s
dannykopping commented 1 month ago

Another datapoint:

https://github.com/coder/coder/actions/runs/9888147173/job/27311405977?pr=13799

=== FAIL: coderd/provisionerdserver  (0.00s)
PASS
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 82 in state chan send, with github.com/coder/coder/v2/coderd/provisionerdserver_test.TestHeartbeat.func1 on top of the stack:
github.com/coder/coder/v2/coderd/provisionerdserver_test.TestHeartbeat.func1({0x2d85c88, 0xc0003adce0})
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver_test.go:108 +0xb3
github.com/coder/coder/v2/coderd/provisionerdserver.(*server).heartbeat(0xc0001b2f00, {0x2d85c88, 0xc0003adce0})
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:275 +0x89
github.com/coder/coder/v2/coderd/provisionerdserver.(*server).heartbeatLoop(0xc0001b2f00)
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:253 +0x309
created by github.com/coder/coder/v2/coderd/provisionerdserver.NewServer in goroutine 62
    /home/runner/work/coder/coder/coderd/provisionerdserver/provisionerdserver.go:224 +0x13b4
]
FAIL    github.com/coder/coder/v2/coderd/provisionerdserver 20.628s