Add profiling to worker timeout case
BUG REPORT
Stack Trace or error message
We have this critical
happening during CI runs:
panic: Critical error: (Sia v1.5.0, Release: testing) worker has taken more than 40 minutes to go idle
Please submit a bug report here: https://gitlab.com/NebulousLabs/Sia/issues
goroutine 581225 [running]:
gitlab.com/NebulousLabs/log.(*Options).Critical(0xc00122ecd8, 0xc000b49b58, 0x1, 0x1)
/builds/NebulousLabs/Sia/.cache/pkg/mod/gitlab.com/!nebulous!labs/log@v0.0.0-20200604091839-0ba4a941cdc2/log.go:95 +0x407
gitlab.com/NebulousLabs/log.(*Logger).Critical(0xc00122ecc0, 0xc000b49b58, 0x1, 0x1)
/builds/NebulousLabs/Sia/.cache/pkg/mod/gitlab.com/!nebulous!labs/log@v0.0.0-20200604091839-0ba4a941cdc2/log.go:121 +0x12f
gitlab.com/NebulousLabs/Sia/modules/renter.(*worker).externSyncAccountBalanceToHost(0xc000b6ae00)
/builds/NebulousLabs/Sia/modules/renter/workeraccount.go:582 +0x228
gitlab.com/NebulousLabs/Sia/modules/renter.(*worker).threadedWorkLoop(0xc000b6ae00)
/builds/NebulousLabs/Sia/modules/renter/workerloop.go:328 +0x641
gitlab.com/NebulousLabs/threadgroup.(*ThreadGroup).Launch.func1(0xc00039b690, 0xc000fcda50)
/builds/NebulousLabs/Sia/.cache/pkg/mod/gitlab.com/!nebulous!labs/threadgroup@v0.0.0-20200608151952-38921fbef213/threadgroup.go:170 +0x35
created by gitlab.com/NebulousLabs/threadgroup.(*ThreadGroup).Launch
/builds/NebulousLabs/Sia/.cache/pkg/mod/gitlab.com/!nebulous!labs/threadgroup@v0.0.0-20200608151952-38921fbef213/threadgroup.go:169 +0xa5
FAIL gitlab.com/NebulousLabs/Sia/siatest/renter 804.512s
Pipeline: https://gitlab.com/NebulousLabs/Sia/-/jobs/642256320
We should add some profiling (https://golang.org/pkg/runtime/#GoroutineProfile) to be triggered when that happens, so we can track the issue.
Expected Behavior
Observed Behavior
How to reproduce it (as minimally and precisely as possible)
Environment
- Sia version:
- OS: