diff options
author | Russ Cox <rsc@golang.org> | 2015-01-14 11:18:24 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-01-14 18:33:38 +0000 |
commit | 5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920 (patch) | |
tree | 261982dd7e9d90851bd718f3d687f6aaafa5a6c5 /src/runtime/os_freebsd.go | |
parent | 094a054bd08ed1f2d28ae660fe6d65028d4c9723 (diff) | |
download | go-5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920.tar.gz go-5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920.zip |
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>
Diffstat (limited to 'src/runtime/os_freebsd.go')
-rw-r--r-- | src/runtime/os_freebsd.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/os_freebsd.go b/src/runtime/os_freebsd.go index 998fbca0f5..c274b39d92 100644 --- a/src/runtime/os_freebsd.go +++ b/src/runtime/os_freebsd.go @@ -27,6 +27,7 @@ func sysctl(mib *uint32, miblen uint32, out *byte, size *uintptr, dst *byte, nds //go:noescape func getrlimit(kind int32, limit unsafe.Pointer) int32 func raise(sig int32) +func raiseproc(sig int32) //go:noescape func sys_umtx_op(addr *uint32, mode int32, val uint32, ptr2, ts *timespec) int32 |