Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
runtime: hang in StopTrace in runtime.test #39004
Passing -trace to
The immediate issue seems to be LockOSThread in init (https://github.com/golang/go/blob/master/src/runtime/runtime_linux_test.go#L24), as the issue goes away if that is removed.
The issue is that the M that stops tracing may be the only one awake. If it is locked, then it will call stoplockedm before checking that it needs to wake the trace reader: https://github.com/golang/go/blob/master/src/runtime/proc.go#L2551-L2597
A rudimentary trace I made:
The reader is woken once, but when it is time to shutdown ("wait for shutdown"), the reader is never woken.
It may make sense to move the trace check (and perhaps GC worker as well?) before stoplockedm, or perhaps we should make some more fundamental change. (Why can't StopTrace call wakep directly?)