Unfortunately, there are no tools like pstack/jstack available at this time.
There are some ways to add code to the source program, such as Debug. Printstack (), and then outside the trigger signal to print the stack content, but in reality the program does not have the code specifically set for debugging.
such as the normal operation of the program, the online program, suddenly deadlock, how to see what each goroutine are doing?
The only way I know now is to send a sigquit signal to the process:
kill -SIGQUIT <pid>
After the go process receives the sigquit signal, it prints out all goroutine stack information to the standard error (STDERR).
Unfortunately, the go process is now out.
If you want to print out all the gorouotine stack, and not kill the process itself, there seems to be no way alas.
In addition Pstack for go process at all, Pstack can print out the operating system level of thread information, but Goroutine does not have the corresponding relationship with thread, especially Gomaxprocs=1, Pstack only prints the stack information for one thread, without any goroutine stack information.