I’ve accidentally created what I believe is a deadlock, and I was expecting to get the “all goroutines are asleep” error, but instead it just hangs indefinitedly. I thought it could be because I have another goroutine running, but it seems that’s not the case ( runtime.NumGoroutine() prints 1 just before the supposed deadlock).
This is fascinating me. I’m able to reproduce this with thishowever you have to download it and run it locally! It doesn’t deadlock in the playground!
I still don’t know what’s going on, but one difference I noticed was that when I run this locally, the call to examiner.Supervise has 3 parameters: The []*q.Q slice’s Data, Len and Cap:
Thanks for the deep dive! I’m not quite sure how commenting out that import helps identify the lack of a deadlock error. On the master branch there’s no use of pprof, and the app never errors out. On the with-profiling branch, even after commenting out "net/http/pprof" the app does not report a deadlock error.