Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: seg fault on Darwin in GC while under debugger #28373

Closed
robaho opened this issue Oct 24, 2018 · 9 comments
Closed

runtime: seg fault on Darwin in GC while under debugger #28373

robaho opened this issue Oct 24, 2018 · 9 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@robaho
Copy link

robaho commented Oct 24, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.11

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

darwin, amd64, osx

What did you do?

running the application under the debugger, after stopping a while at a breakpoint and resuming, it panics
not sure it would help, but the stack trace may be obvious - the panic is in the GC

What did you expect to see?

What did you see instead?

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4fffff8 pc=0x1028007]

runtime stack:
runtime.throw(0x1b365fa, 0x2a)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
/usr/local/Cellar/go/1.11/libexec/src/runtime/signal_unix.go:374 +0x288
runtime.spanOf(0xffffffffffffffff, 0x2df3421)
/usr/local/Cellar/go/1.11/libexec/src/runtime/mheap.go:519 +0x87
runtime.findObject(0xffffffffffffffff, 0x0, 0x0, 0x7fff7141f6c3, 0x4e, 0x4e)
/usr/local/Cellar/go/1.11/libexec/src/runtime/mbitmap.go:365 +0x2f
runtime.wbBufFlush1(0xc000044500)
/usr/local/Cellar/go/1.11/libexec/src/runtime/mwbbuf.go:252 +0xe5
runtime.wbBufFlush.func1()
/usr/local/Cellar/go/1.11/libexec/src/runtime/mwbbuf.go:195 +0x48
runtime.systemstack(0x700004ebbe88)
/usr/local/Cellar/go/1.11/libexec/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
/usr/local/Cellar/go/1.11/libexec/src/runtime/proc.go:1229

@bradfitz bradfitz changed the title seg fault runtime: seg fault on Darwin in GC while under debugger Oct 25, 2018
@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 25, 2018
@bradfitz
Copy link
Contributor

/cc @aclements

@katiehockman
Copy link
Contributor

cc more owners, to see if someone can look into this: @rsc @RLH @randall77

A very similar error is failing all linux-arm-arm5spacemonkey builds as well:

##### ../doc/progs
json2 failed: exit status 2
Output:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0xb592ea60 pc=0x19d70]

goroutine 1 [running]:
runtime.throw(0xc6d80, 0x2a)
	/home/builder/stage0scratch/workdir/go/src/runtime/panic.go:608 +0x5c fp=0x4286e8 sp=0x4286d4 pc=0x37b50
runtime.sigpanic()
	/home/builder/stage0scratch/workdir/go/src/runtime/signal_unix.go:374 +0x224 fp=0x428708 sp=0x4286e8 pc=0x4a888
runtime.mallocgc(0x8, 0xb592ea51, 0x0, 0x3)
	/home/builder/stage0scratch/workdir/go/src/runtime/malloc.go:824 +0x130 fp=0x428774 sp=0x42870c pc=0x19d70
runtime.convT2E64(0xb592ea51, 0xf5340e4f, 0x40383a23, 0x4006374b, 0xf5340e4f)
	/home/builder/stage0scratch/workdir/go/src/runtime/iface.go:324 +0x68 fp=0x428788 sp=0x428774 pc=0x181dc
main.InterfaceExample()
	/home/builder/stage0scratch/workdir/go/doc/progs/json2.go:21 +0xa0 fp=0x4287c0 sp=0x428788 pc=0x90ce0
main.main()
	/home/builder/stage0scratch/workdir/go/doc/progs/json2.go:41 +0x14 fp=0x4287c4 sp=0x4287c0 pc=0x90dfc
runtime.main()
	/home/builder/stage0scratch/workdir/go/src/runtime/proc.go:201 +0x1f4 fp=0x4287e4 sp=0x4287c4 pc=0x39720
runtime.goexit()
	/home/builder/stage0scratch/workdir/go/src/runtime/asm_arm.s:871 +0x4 fp=0x4287e4 sp=0x4287e4 pc=0x6166c

@katiehockman
Copy link
Contributor

A potentially related issue (also getting segment violations): #27660

@robaho
Copy link
Author

robaho commented Nov 6, 2018

Here is a complete stack-trace of all threads when it panics:

GOROOT=/usr/local/Cellar/go/1.11.1/libexec #gosetup
GOPATH=/Users/robertengels/go #gosetup
/usr/local/Cellar/go/1.11.1/libexec/bin/go build -o /private/var/folders/08/frj0pqfn5s18jf1qw12_rq_w0000gn/T/___go_build_nats_bench_go -gcflags "all=-N -l" /Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go #gosetup
"/Users/robertengels/Library/Application Support/IntelliJIdea2018.2/intellij-go/lib/dlv/mac/dlv" --listen=localhost:57327 --headless=true --api-version=2 --backend=native exec /private/var/folders/08/frj0pqfn5s18jf1qw12_rq_w0000gn/T/___go_build_nats_bench_go -- -n 10000000 -ns 4 -np 1 mytopic #gosetup
API server listening at: 127.0.0.1:57327
Starting benchmark [msgs=10000000, msgsize=128, pubs=1, subs=4]
fatal error: unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4fffdd8 pc=0x1027807]

runtime stack:
runtime.throw(0x1317ec0, 0x2a)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/signal_unix.go:374 +0x288
runtime.spanOf(0x7ffeefbff840, 0xc000064000)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mheap.go:519 +0x87
runtime.findObject(0x7ffeefbff840, 0x14e9280, 0x1b8, 0x158eda8, 0xc000028170, 0x1)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mbitmap.go:365 +0x2f
runtime.scanblock(0x14e9280, 0x1e370, 0x1597a20, 0xc000028170)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:1048 +0xc6
runtime.markrootBlock(0x14e9280, 0x1e370, 0x1597a20, 0xc000028170, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:294 +0xb9
runtime.markroot(0xc000028170, 0x3)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:200 +0x26a
runtime.gcDrainN(0xc000028170, 0x10000, 0xc000024a00)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:998 +0xfb
runtime.gcAssistAlloc1(0xc000126480, 0x10000)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:557 +0x104
runtime.gcAssistAlloc.func1()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:468 +0x33
runtime.systemstack(0x70000d79ee88)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/proc.go:1229

goroutine 6 [GC assist marking]:
runtime.systemstack_switch()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:311 fp=0xc0000417d8 sp=0xc0000417d0 pc=0x105cb60
runtime.gcAssistAlloc(0xc000126480)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:467 +0x162 fp=0xc000041818 sp=0xc0000417d8 pc=0x1022262
runtime.mallocgc(0x7, 0x0, 0xc0000e8000, 0x50)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/malloc.go:807 +0x793 fp=0xc0000418c0 sp=0xc000041818 pc=0x100e443
runtime.slicebytetostring(0x0, 0xc0001e72a0, 0x7, 0x6d60, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/string.go:102 +0xeb fp=0xc0000418f8 sp=0xc0000418c0 pc=0x104b2ab
github.com/nats-io/go-nats.(*Conn).processMsg(0xc0000da000, 0xc0001e72af, 0x80, 0x6d51)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1824 +0x130 fp=0xc000041a40 sp=0xc0000418f8 pc=0x12867e0
github.com/nats-io/go-nats.(*Conn).parse(0xc0000da000, 0xc0001e6000, 0x8000, 0x8000, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/parser.go:177 +0x1546 fp=0xc000041ef8 sp=0xc000041a40 pc=0x128d486
github.com/nats-io/go-nats.(*Conn).readLoop(0xc0000da000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1714 +0x3b1 fp=0xc000041fd8 sp=0xc000041ef8 pc=0x1286101
runtime.goexit()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000041fe0 sp=0xc000041fd8 pc=0x105ec21
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1139 +0x2c8

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc000090458)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc000090450)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/waitgroup.go:130 +0xd6
main.main()
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:97 +0xb63

goroutine 19 [chan receive]:
main.runSubscriber(0xc000090440, 0xc000090450, 0x0, 0x0, 0xc0000878e0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:161 +0x42c
created by main.main
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:83 +0x757

goroutine 20 [chan receive]:
main.runSubscriber(0xc000090440, 0xc000090450, 0x0, 0x0, 0xc0000878e0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:161 +0x42c
created by main.main
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:83 +0x757

goroutine 21 [chan receive]:
main.runSubscriber(0xc000090440, 0xc000090450, 0x0, 0x0, 0xc0000878e0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:161 +0x42c
created by main.main
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:83 +0x757

goroutine 22 [chan receive]:
main.runSubscriber(0xc000090440, 0xc000090450, 0x0, 0x0, 0xc0000878e0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:161 +0x42c
created by main.main
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:83 +0x757

goroutine 27 [runnable]:
github.com/nats-io/go-nats.(*Conn).processMsg(0xc0000ea000, 0xc0001d963e, 0x80, 0x49c2)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1835 +0x2d6
github.com/nats-io/go-nats.(*Conn).parse(0xc0000ea000, 0xc0001d6000, 0x8000, 0x8000, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/parser.go:177 +0x1546
github.com/nats-io/go-nats.(*Conn).readLoop(0xc0000ea000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1714 +0x3b1
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1139 +0x2c8

goroutine 28 [chan receive]:
github.com/nats-io/go-nats.(*Conn).flusher(0xc0000ea000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1952 +0x12e
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1140 +0x2ed

goroutine 36 [runnable]:
github.com/nats-io/go-nats.(*Conn).processMsg(0xc0000ec000, 0xc0001dfe94, 0x80, 0x616c)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1807 +0xa0d
github.com/nats-io/go-nats.(*Conn).parse(0xc0000ec000, 0xc0001de000, 0x8000, 0x8000, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/parser.go:177 +0x1546
github.com/nats-io/go-nats.(*Conn).readLoop(0xc0000ec000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1714 +0x3b1
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1139 +0x2c8

goroutine 52 [runnable]:
github.com/nats-io/go-nats.(*Conn).processMsg(0xc0000dc000, 0xc0001ced72, 0x80, 0x728e)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1807 +0xa0d
github.com/nats-io/go-nats.(*Conn).parse(0xc0000dc000, 0xc0001ce000, 0x8000, 0x8000, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/parser.go:177 +0x1546
github.com/nats-io/go-nats.(*Conn).readLoop(0xc0000dc000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1714 +0x3b1
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1139 +0x2c8

goroutine 29 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc000108050, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc000108040)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*asyncCallbacksHandler).asyncCBDispatcher(0xc0000f0020)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1623 +0x5b
created by github.com/nats-io/go-nats.Options.Connect
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:812 +0x31e

goroutine 53 [chan receive]:
github.com/nats-io/go-nats.(*Conn).flusher(0xc0000dc000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1952 +0x12e
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1140 +0x2ed

goroutine 30 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc000093890, 0x6c42)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc000093880)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*Conn).waitForMsgs(0xc0000ea000, 0xc0001b60c0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1745 +0x444
created by github.com/nats-io/go-nats.(*Conn).subscribe
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2518 +0x374

goroutine 54 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc00005a090, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc00005a080)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*asyncCallbacksHandler).asyncCBDispatcher(0xc00000c080)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1623 +0x5b
created by github.com/nats-io/go-nats.Options.Connect
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:812 +0x31e

goroutine 55 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc00010c210, 0x43d5)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc00010c200)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*Conn).waitForMsgs(0xc0000dc000, 0xc0001c8000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1745 +0x444
created by github.com/nats-io/go-nats.(*Conn).subscribe
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2518 +0x374

goroutine 37 [chan receive]:
github.com/nats-io/go-nats.(*Conn).flusher(0xc0000ec000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1952 +0x12e
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1140 +0x2ed

goroutine 38 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc00010c050, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc00010c040)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*asyncCallbacksHandler).asyncCBDispatcher(0xc000102020)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1623 +0x5b
created by github.com/nats-io/go-nats.Options.Connect
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:812 +0x31e

goroutine 7 [chan receive]:
github.com/nats-io/go-nats.(*Conn).flusher(0xc0000da000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1952 +0x12e
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1140 +0x2ed

goroutine 8 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc000093690, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc000093680)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*asyncCallbacksHandler).asyncCBDispatcher(0xc0000a6a40)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1623 +0x5b
created by github.com/nats-io/go-nats.Options.Connect
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:812 +0x31e

goroutine 39 [runnable]:
sync.runtime_notifyListWait(0xc000108210, 0x3d73)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc000108200)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*Conn).waitForMsgs(0xc0000ec000, 0xc0001ca000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1745 +0x444
created by github.com/nats-io/go-nats.(*Conn).subscribe
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2518 +0x374

goroutine 9 [runnable]:
sync.runtime_notifyListWait(0xc00005a250, 0x8c8c)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc00005a240)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*Conn).waitForMsgs(0xc0000da000, 0xc0001cc000)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1745 +0x444
created by github.com/nats-io/go-nats.(*Conn).subscribe
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2518 +0x374

goroutine 31 [IO wait (scan)]:
internal/poll.runtime_pollWait(0x2414bc0, 0x77, 0x23)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/netpoll.go:173 +0x5e
internal/poll.(*pollDesc).wait(0xc00009f418, 0x77, 0x135a100, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_poll_runtime.go:85 +0x96
internal/poll.(*pollDesc).waitWrite(0xc00009f418, 0xc0001fbd00, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_poll_runtime.go:94 +0x45
internal/poll.(*FD).Write(0xc00009f400, 0xc0001f6000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_unix.go:276 +0x3ec
net.(*netFD).Write(0xc00009f400, 0xc0001f6000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/net/fd_unix.go:220 +0x7a
net.(*conn).Write(0xc000118010, 0xc0001f6000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/net/net.go:189 +0xb0
bufio.(*Writer).Flush(0xc000108300, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/bufio/bufio.go:575 +0x147
bufio.(*Writer).Write(0xc000108300, 0xc000212180, 0x80, 0x80, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/bufio/bufio.go:611 +0x360
github.com/nats-io/go-nats.(*Conn).publish(0xc0000daa00, 0x7ffeefbffa53, 0x7, 0x0, 0x0, 0xc000212180, 0x80, 0x80, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2232 +0xbe2
github.com/nats-io/go-nats.(*Conn).Publish(0xc0000daa00, 0x7ffeefbffa53, 0x7, 0xc000212180, 0x80, 0x80, 0x0, 0x0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:2139 +0x80
main.runPublisher(0xc000090440, 0xc000090450, 0x0, 0x0, 0xc0000878e0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:128 +0x372
created by main.main
	/Users/robertengels/go/src/github.com/nats-io/go-nats/examples/nats-bench.go:91 +0x900

goroutine 40 [IO wait]:
internal/poll.runtime_pollWait(0x2414bc0, 0x72, 0x23)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/netpoll.go:173 +0x5e
internal/poll.(*pollDesc).wait(0xc00009f418, 0x72, 0x135a100, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_poll_runtime.go:85 +0x96
internal/poll.(*pollDesc).waitRead(0xc00009f418, 0xc000216000, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_poll_runtime.go:90 +0x45
internal/poll.(*FD).Read(0xc00009f400, 0xc000216000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/internal/poll/fd_unix.go:169 +0x36a
net.(*netFD).Read(0xc00009f400, 0xc000216000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/net/fd_unix.go:202 +0x7a
net.(*conn).Read(0xc000118010, 0xc000216000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/net/net.go:177 +0xb0
github.com/nats-io/go-nats.(*Conn).readLoop(0xc0000daa00)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1708 +0x2dc
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1139 +0x2c8

goroutine 41 [semacquire]:
sync.runtime_SemacquireMutex(0xc0000daa2c, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc0000daa28)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/mutex.go:134 +0x25d
github.com/nats-io/go-nats.(*Conn).flusher(0xc0000daa00)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1955 +0x161
created by github.com/nats-io/go-nats.(*Conn).processConnectInit
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1140 +0x2ed

goroutine 42 [sync.Cond.Wait]:
sync.runtime_notifyListWait(0xc000093950, 0x0)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/sema.go:510 +0xfb
sync.(*Cond).Wait(0xc000093940)
	/usr/local/Cellar/go/1.11.1/libexec/src/sync/cond.go:56 +0x87
github.com/nats-io/go-nats.(*asyncCallbacksHandler).asyncCBDispatcher(0xc0000a6de0)
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:1623 +0x5b
created by github.com/nats-io/go-nats.Options.Connect
	/Users/robertengels/go/src/github.com/nats-io/go-nats/nats.go:812 +0x31e
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4fffdd8 pc=0x1027807]

runtime stack:
runtime.throw(0x1317ec0, 0x2a)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/signal_unix.go:374 +0x288
runtime.spanOf(0x7ffeefbffa53, 0xc0000da001)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mheap.go:519 +0x87
runtime.findObject(0x7ffeefbffa53, 0xc000047da8, 0x28, 0x1590860, 0xc000021270, 0x2)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mbitmap.go:365 +0x2f
runtime.scanblock(0xc000047da8, 0xf0, 0x13318f8, 0xc000021270)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:1048 +0xc6
runtime.scanframeworker(0x70000d615ad0, 0x70000d615ba8, 0xc000021270)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:803 +0xca
runtime.scanstack.func1(0x70000d615ad0, 0x0, 0x14d4001)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:783 +0x3d
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xc00007b500, 0x0, 0x0, 0x7fffffff, 0x70000d615ca8, 0x0, 0x0, ...)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/traceback.go:325 +0x1453
runtime.scanstack(0xc00007b500, 0xc000021270)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:786 +0x184
runtime.scang(0xc00007b500, 0xc000021270)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/proc.go:947 +0x20b
runtime.markroot.func1()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:264 +0x69
runtime.markroot(0xc000021270, 0x23)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:245 +0x1c9
runtime.gcDrain(0xc000021270, 0x6)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgcmark.go:882 +0x117
runtime.gcBgMarkWorker.func2()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/mgc.go:1858 +0xed
runtime.systemstack(0x70000d615e88)
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
	/usr/local/Cellar/go/1.11.1/libexec/src/runtime/proc.go:1229

Debugger finished with exit code 0

@robaho
Copy link
Author

robaho commented Nov 29, 2018

I also have the same behavior with 1.11.2

@cristaloleg
Copy link

@robaho can you confirm this issue with 1.17.x ?

@davecheney davecheney added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed OS-Linux NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 26, 2022
@robaho
Copy link
Author

robaho commented Jan 27, 2022

It's been 4 years... but I did try and reproduce. I was unable to reproduce the crash. However, there seems to be an issue with the debugger/runtime where "stepping out" from the proc.go assembly support code "locks" the process and it makes no progress, nor is it able to be interrupted (manual break) again.

@robaho
Copy link
Author

robaho commented Jan 27, 2022

Specifically stepping out from gopark()

@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Aug 20, 2022
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

7 participants