]> Cypherpunks repositories - gostls13.git/commit
runtime: log all thread stack traces during GODEBUG=crash on Linux and OS X
authorRuss Cox <rsc@golang.org>
Wed, 14 Jan 2015 16:18:24 +0000 (11:18 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 14 Jan 2015 18:33:38 +0000 (18:33 +0000)
commit5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920
tree261982dd7e9d90851bd718f3d687f6aaafa5a6c5
parent094a054bd08ed1f2d28ae660fe6d65028d4c9723
runtime: log all thread stack traces during GODEBUG=crash on Linux and OS X

Normally, a panic/throw only shows the thread stack for the current thread
and all paused goroutines. Goroutines running on other threads, or other threads
running on their system stacks, are opaque. Change that when GODEBUG=crash,
by passing a SIGQUIT around to all the threads when GODEBUG=crash.
If this works out reasonably well, we might make the SIGQUIT relay part of
the standard panic/throw death, perhaps eliding idle m's.

Change-Id: If7dd354f7f3a6e326d17c254afcf4f7681af2f8b
Reviewed-on: https://go-review.googlesource.com/2811
Reviewed-by: Rick Hudson <rlh@golang.org>
23 files changed:
src/runtime/defs_nacl_386.go
src/runtime/defs_nacl_amd64p32.go
src/runtime/defs_nacl_arm.go
src/runtime/defs_windows.go
src/runtime/defs_windows_386.go
src/runtime/defs_windows_amd64.go
src/runtime/os1_windows.go
src/runtime/os2_plan9.go
src/runtime/os3_solaris.go
src/runtime/os_darwin.go
src/runtime/os_dragonfly.go
src/runtime/os_freebsd.go
src/runtime/os_linux.go
src/runtime/os_nacl.go
src/runtime/os_netbsd.go
src/runtime/os_openbsd.go
src/runtime/signal_amd64x.go
src/runtime/sys_darwin_386.s
src/runtime/sys_darwin_amd64.s
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_arm.s
src/runtime/sys_linux_ppc64x.s