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
Thank you for raising this issue. The deadlock detector is intended to be a best effort approach — it’s pretty easy to detect a deadlock if there are no runnable goroutines — but it is equally detestable with a small goroutine waiting on a timer.
Variations of this issue have been discussed in the past. I would appreciate it if you would review the closed issues and if you feel this is a duplicate of either an open or closed issue on this topic would you consider closing it as a duplicate.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Following
Expected code
raisesfatal error: all goroutines are asleep - deadlock!
.And this is expected code, because
errc
is not buffered.Working as expected code
But, following code importing
net/http
does not raise error, just hangs.importing 'net/http' code
What did you expect to see?
Both of above codes should raise
fatal error: all goroutines are asleep - deadlock!
What did you see instead?
First code:
fatal error: all goroutines are asleep - deadlock!
👍Second code: program stops(not finish) 🤔
The text was updated successfully, but these errors were encountered: