You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some outputs about the bug from goleak are as follows:
Goroutine 85 in state sync.Cond.Wait, with sync.runtime_notifyListWait on top of the stack:
sync.runtime_notifyListWait(0xc00007e1d0, 0x0)
/usr/local/go/src/runtime/sema.go:587 +0x159
sync.(*Cond).Wait(0x3b9aca00?)
/usr/local/go/src/sync/cond.go:71 +0x85
github.com/miekg/dns.checkInProgressQueriesAtShutdownServer.func2({0x8b3e30, 0xc000038c80}, 0xc0000f54d0)
/home/song2048/桌面/goProject/src/github.com/system-pclub/GCatch/GCatch/testdata/src/github.com/dns/server_test.go:736 +0x9a
The text was updated successfully, but these errors were encountered:
For the lock and condition variable, if the testShutdownNotify.Wait() get executed very late, some goroutine will leak.
dns/server_test.go
Lines 733 to 735 in b77d1ed
The interleaved sequence that trigger bugs can be reproduced by adding
time.Sleep
to make Wait() executes late like this:After that, you can use goleak to reproduce the bug in the test function.
dns/server_test.go
Line 825 in b77d1ed
Some outputs about the bug from goleak are as follows:
The text was updated successfully, but these errors were encountered: