pebbe / zmq4

A Go interface to ZeroMQ version 4
BSD 2-Clause "Simplified" License
1.17k stars 163 forks source link

while running a zmq poller a strace or other debug like thing on that pid will trigger a SIGTRAP and abort #80

Open ljackson opened 8 years ago

ljackson commented 8 years ago

SIGTRAP: trace trap PC=0x7fc3b714f9d3 m=8 signal arrived during cgo execution

goroutine 48 [syscall, locked to thread]: runtime.cgocall(0x8e1e20, 0xc820365b90, 0x0) /usr/local/go/src/runtime/cgocall.go:123 +0x11b fp=0xc820365b20 sp=0xc820365af0 github.com/pebbe/zmq4._C2func_zmq_poll(0xc82044a0d0, 0xc800000001, 0xffffffffffffffff, 0x0, 0x0, 0x0) ??:0 +0x55 fp=0xc820365b90 sp=0xc820365b20 github.com/pebbe/zmq4.(_Poller).poll(0xc820365f58, 0xffffffffffffffff, 0x40ab00, 0x0, 0x0, 0x0, 0x0, 0x0) /home/leif/sources/golang/src/github.com/pebbe/zmq4/polling.go:127 +0x26a fp=0xc820365cd8 sp=0xc820365b90 github.com/pebbe/zmq4.(_Poller).Poll(0xc820365f58, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0) /home/leif/sources/golang/src/github.com/pebbe/zmq4/polling.go:101 +0x4d fp=0xc820365d20 sp=0xc820365cd8

@pebbe do you think we could just do a sig ignore in your c code as I don't want a strace of this "hot" pid to trigger a process crash thoughts? It may have something to with the locked to thread I put on the goroutine handling the poller and the socket but without the lock I can't get performance up high enough.

poller is watching one DEALER socket with POLLIN|POLLOUT so that I can read anything from socket and send to a go chan and trigger pollout so I can read from another go chan and write to zmq socket all in the same goroutine. Thx

pebbe commented 8 years ago

I don't understand this.

ljackson commented 8 years ago

@pebbe What can I do to help clarify?