(gdb) thread find . Thread 1 has target id 'Thread 0x1a03 of process 45503' Thread 2 has target id 'Thread 0x1b03 of process 45503' Thread 3 has target id 'Thread 0x1c03 of process 45503' Thread 4 has target id 'Thread 0x1d03 of process 45503' Thread 5 has target id 'Thread 0x1e03 of process 45503' Thread 6 has target id 'Thread 0x1f03 of process 45503' (gdb) thread 1 [Switching to thread 1 (Thread 0x1a03 of process 45503)] #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 411 MOVL AX, ret+8(FP) (gdb) bt #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 #1 0x000000000402cc7b in runtime.semasleep1 (ns=-1, ~r1=0) at /go/tip/src/runtime/os_darwin.go:435 #2 0x0000000004055473 in runtime.semasleep.func1 () at /go/tip/src/runtime/os_darwin.go:451 #3 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #4 0x000000000402cdb4 in runtime.semasleep (ns=-1, ~r1=68514241) at /go/tip/src/runtime/os_darwin.go:452 #5 0x0000000004014a95 in runtime.lock (l=0x4159d40 ) at /go/tip/src/runtime/lock_sema.go:85 #6 0x000000000401a001 in runtime.allocmcache (~r0=0x0) at /go/tip/src/runtime/mcache.go:75 #7 0x000000000402f3b8 in runtime.startpanic_m () at /go/tip/src/runtime/panic.go:604 #8 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #9 0x000000000402ef5e in runtime.startpanic () at /go/tip/src/runtime/panic.go:544 #10 0x000000000402f088 in runtime.throw (s=...) at /go/tip/src/runtime/panic.go:565 #11 0x00000000040431bc in runtime.sigpanic () at /go/tip/src/runtime/sigpanic_unix.go:12 #12 0x000000000405ecf5 in runtime.write () at /go/tip/src/runtime/sys_darwin_amd64.s:71 #13 0x00000000040539a2 in runtime.writeErr (b=...) at /go/tip/src/runtime/write_err.go:12 #14 0x000000000402fab7 in runtime.gwrite (b=...) at /go/tip/src/runtime/print.go:58 #15 0x00000000040302fc in runtime.printstring (s=...) at /go/tip/src/runtime/print.go:206 #16 0x000000000402f05d in runtime.throw (s=...) at /go/tip/src/runtime/panic.go:560 #17 0x00000000040431bc in runtime.sigpanic () at /go/tip/src/runtime/sigpanic_unix.go:12 #18 0x000000000405f026 in runtime.usleep () at /go/tip/src/runtime/sys_darwin_amd64.s:288 #19 0x000000000402ce4a in runtime.osyield () at /go/tip/src/runtime/os_darwin.go:477 #20 0x0000000004014a9e in runtime.lock (l=0x4159d40 ) at /go/tip/src/runtime/lock_sema.go:67 #21 0x000000000401a001 in runtime.allocmcache (~r0=0x0) at /go/tip/src/runtime/mcache.go:75 #22 0x000000000402f3b8 in runtime.startpanic_m () at /go/tip/src/runtime/panic.go:604 #23 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #24 0x000000000402ef5e in runtime.startpanic () at /go/tip/src/runtime/panic.go:544 #25 0x000000000402f088 in runtime.throw (s=...) at /go/tip/src/runtime/panic.go:565 #26 0x00000000040431bc in runtime.sigpanic () at /go/tip/src/runtime/sigpanic_unix.go:12 #27 0x000000000405f026 in runtime.usleep () at /go/tip/src/runtime/sys_darwin_amd64.s:288 #28 0x000000000402ce4a in runtime.osyield () at /go/tip/src/runtime/os_darwin.go:477 #29 0x0000000004014a9e in runtime.lock (l=0x4159d40 ) at /go/tip/src/runtime/lock_sema.go:67 #30 0x000000000401a001 in runtime.allocmcache (~r0=0x0) at /go/tip/src/runtime/mcache.go:75 #31 0x000000000402f3b8 in runtime.startpanic_m () at /go/tip/src/runtime/panic.go:604 #32 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #33 0x000000000402ef5e in runtime.startpanic () at /go/tip/src/runtime/panic.go:544 #34 0x000000000402f088 in runtime.throw (s=...) at /go/tip/src/runtime/panic.go:565 #35 0x00000000040431bc in runtime.sigpanic () at /go/tip/src/runtime/sigpanic_unix.go:12 #36 0x000000000405f026 in runtime.usleep () at /go/tip/src/runtime/sys_darwin_amd64.s:288 #37 0x000000000402ce4a in runtime.osyield () at /go/tip/src/runtime/os_darwin.go:477 #38 0x0000000004014a9e in runtime.lock (l=0x4159d40 ) at /go/tip/src/runtime/lock_sema.go:67 #39 0x000000000401a001 in runtime.allocmcache (~r0=0x0) at /go/tip/src/runtime/mcache.go:75 #40 0x000000000402f3b8 in runtime.startpanic_m () at /go/tip/src/runtime/panic.go:604 #41 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #42 0x000000000402ef5e in runtime.startpanic () at /go/tip/src/runtime/panic.go:544 #43 0x000000000402f088 in runtime.throw (s=...) at /go/tip/src/runtime/panic.go:565 #44 0x00000000040431bc in runtime.sigpanic () at /go/tip/src/runtime/sigpanic_unix.go:12 #45 0x000000000405f14b in runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:410 #46 0x000000000402cc7b in runtime.semasleep1 (ns=-1, ~r1=0) at /go/tip/src/runtime/os_darwin.go:435 #47 0x0000000004055473 in runtime.semasleep.func1 () at /go/tip/src/runtime/os_darwin.go:451 #48 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 ---Type to continue, or q to quit---q Quit (gdb) thread 2 [Switching to thread 2 (Thread 0x1b03 of process 45503)] #0 thread1 (p=0x0) at /go/tip/src/runtime/testdata/testprogcgo/threadprof.go:18 18 while (spinlock == 0) (gdb) bt #0 thread1 (p=0x0) at /go/tip/src/runtime/testdata/testprogcgo/threadprof.go:18 #1 0x00007fff85e4f9b1 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib #2 0x00007fff85e4f92e in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib #3 0x00007fff85e4d385 in thread_start () from /usr/lib/system/libsystem_pthread.dylib #4 0x0000000000000000 in ?? () (gdb) thread 3 [Switching to thread 3 (Thread 0x1c03 of process 45503)] #0 runtime.usleep () at /go/tip/src/runtime/sys_darwin_amd64.s:289 289 RET (gdb) bt #0 runtime.usleep () at /go/tip/src/runtime/sys_darwin_amd64.s:289 #1 0x000000000403a093 in runtime.sysmon () at /go/tip/src/runtime/proc.go:3579 #2 0x00000000040334ce in runtime.mstart1 () at /go/tip/src/runtime/proc.go:1125 #3 0x00000000040333a4 in runtime.mstart () at /go/tip/src/runtime/proc.go:1095 #4 0x00000000040aa76d in crosscall_amd64 () #5 0x00000000040aa510 in _cgo_sys_thread_start () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) thread 4 [Switching to thread 4 (Thread 0x1d03 of process 45503)] #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 411 MOVL AX, ret+8(FP) (gdb) bt #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 #1 0x000000000402cc7b in runtime.semasleep1 (ns=-1, ~r1=67333434) at /go/tip/src/runtime/os_darwin.go:435 #2 0x0000000004055473 in runtime.semasleep.func1 () at /go/tip/src/runtime/os_darwin.go:451 #3 0x000000000405b259 in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:298 #4 0x0000000004033340 in runtime.startTheWorldWithSema () #5 0x000000c42001a000 in ?? () #6 0x0000000000000000 in ?? () (gdb) thread 5 [Switching to thread 5 (Thread 0x1e03 of process 45503)] #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 411 MOVL AX, ret+8(FP) (gdb) bt #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 #1 0x000000000402cc7b in runtime.semasleep1 (ns=-1, ~r1=67270288) at /go/tip/src/runtime/os_darwin.go:435 #2 0x0000000004055473 in runtime.semasleep.func1 () at /go/tip/src/runtime/os_darwin.go:451 #3 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #4 0x000000000402cdb4 in runtime.semasleep (ns=-1, ~r1=68514241) at /go/tip/src/runtime/os_darwin.go:452 #5 0x0000000004014a95 in runtime.lock (l=0x4159d40 ) at /go/tip/src/runtime/lock_sema.go:85 #6 0x00000000040267ba in runtime.(*mheap).allocStack (h=0x4159d40 , npage=4, ~r1=0x0) at /go/tip/src/runtime/mheap.go:591 #7 0x000000000404482d in runtime.stackalloc (n=123145304446720, ~r1=..., ~r2=...) at /go/tip/src/runtime/stack.go:395 #8 0x0000000004055dd5 in runtime.malg.func1 () at /go/tip/src/runtime/proc.go:2665 #9 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #10 0x00000000040376ba in runtime.malg (stacksize=32768, ~r1=0x27102006e680) at /go/tip/src/runtime/proc.go:2666 #11 0x000000000402c51d in runtime.mpreinit (mp=0xc420029400) at /go/tip/src/runtime/os_darwin.go:152 #12 0x0000000004031ce3 in runtime.mcommoninit (mp=0xc420029400) at /go/tip/src/runtime/proc.go:506 #13 0x0000000004033afb in runtime.allocm (_p_=0x0, fn={void (void)} 0x700000209810, ~r2=0x403741f ) at /go/tip/src/runtime/proc.go:1285 #14 0x0000000004033dc7 in runtime.newextram () at /go/tip/src/runtime/proc.go:1401 #15 0x000000000405b259 in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:298 #16 0x0000000004033340 in runtime.startTheWorldWithSema () #17 0x0000700000209858 in ?? () #18 0x0000000000000000 in ?? () (gdb) thread 6 [Switching to thread 6 (Thread 0x1f03 of process 45503)] #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 411 MOVL AX, ret+8(FP) (gdb) bt #0 runtime.mach_semaphore_wait () at /go/tip/src/runtime/sys_darwin_amd64.s:411 #1 0x000000000402cc7b in runtime.semasleep1 (ns=-1, ~r1=68512144) at /go/tip/src/runtime/os_darwin.go:435 #2 0x0000000004055473 in runtime.semasleep.func1 () at /go/tip/src/runtime/os_darwin.go:451 #3 0x000000000405b28b in runtime.systemstack () at /go/tip/src/runtime/asm_amd64.s:314 #4 0x000000000402cdb4 in runtime.semasleep (ns=-1, ~r1=0) at /go/tip/src/runtime/os_darwin.go:452 #5 0x0000000004014dbf in runtime.notesleep (n=0xc420028d10) at /go/tip/src/runtime/lock_sema.go:166 #6 0x00000000040343ad in runtime.stopm () at /go/tip/src/runtime/proc.go:1567 #7 0x0000000004034c6f in runtime.startlockedm (gp=0xc42006e820) at /go/tip/src/runtime/proc.go:1744 #8 0x0000000004035cd8 in runtime.schedule () at /go/tip/src/runtime/proc.go:2106 #9 0x0000000004033488 in runtime.mstart1 () at /go/tip/src/runtime/proc.go:1135 #10 0x00000000040333a4 in runtime.mstart () at /go/tip/src/runtime/proc.go:1095 #11 0x00000000040aa76d in crosscall_amd64 () #12 0x00000000040aa510 in _cgo_sys_thread_start () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb)