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

Dead lock, how to fix? #132

Open
hailwind opened this issue Aug 10, 2022 · 2 comments
Open

Dead lock, how to fix? #132

hailwind opened this issue Aug 10, 2022 · 2 comments

Comments

@hailwind
Copy link

hailwind commented Aug 10, 2022

goroutine stack behind, how to fix this problem?

1 @ 0x43a576 0x44aff3 0x44afcd 0x4661e5 0x481732 0x74fa67 0x7763d7 0x774a46 0x78c84d 0x78cd87 0x78cf78 0x46a141
#	0x4661e4	sync.runtime_Semacquire+0x24				/opt/go/src/runtime/sema.go:56
#	0x481731	sync.(*WaitGroup).Wait+0x51				/opt/go/src/sync/waitgroup.go:136
#	0x74fa66	golang.org/x/sync/errgroup.(*Group).Wait+0x26		/home/alexw/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:53
#	0x7763d6	github.com/go-zeromq/zmq4.(*routerMWriter).write+0x2d6	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/router.go:242
#	0x774a45	github.com/go-zeromq/zmq4.(*routerSocket).Send+0xe5	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/router.go:40
#	0x78c84c	sdwan/ctrl/device.(*ZeroMQ).sendMsg+0x28c		/home/alexw/workspace/hw-agent/ctrl/device/zmq.go:60
#	0x78cd86	sdwan/ctrl/device.(*ZeroMQ).runSend+0x126		/home/alexw/workspace/hw-agent/ctrl/device/zmq.go:102
#	0x78cf77	sdwan/ctrl/device.RunZmq+0xf7				/home/alexw/workspace/hw-agent/ctrl/device/zmq.go:124

1 @ 0x43a576 0x44aff3 0x44afcd 0x466305 0x47fca5 0x47fadb 0x778a99 0x771a02 0x7719ee 0x771b39 0x77117c 0x76fb2d 0x7764ba 0x74fc04 0x46a141
#	0x466304	sync.runtime_SemacquireMutex+0x24				/opt/go/src/runtime/sema.go:71
#	0x47fca4	sync.(*Mutex).lockSlow+0x164					/opt/go/src/sync/mutex.go:162
#	0x47fada	sync.(*Mutex).Lock+0x3a						/opt/go/src/sync/mutex.go:81
#	0x778a98	github.com/go-zeromq/zmq4.(*socket).scheduleRmConn+0x38		/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:334
#	0x771a01	github.com/go-zeromq/zmq4.(*Conn).notifyOnCloseError+0x41	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:500
#	0x7719ed	github.com/go-zeromq/zmq4.(*Conn).SetClosed+0x2d		/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:472
#	0x771b38	github.com/go-zeromq/zmq4.(*Conn).checkIO+0xf8			/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:492
#	0x77117b	github.com/go-zeromq/zmq4.(*Conn).send+0x17b			/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:357
#	0x76fb2c	github.com/go-zeromq/zmq4.(*Conn).SendMsg+0x16c			/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:190
#	0x7764b9	github.com/go-zeromq/zmq4.(*routerMWriter).write.func1+0x39	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/router.go:239
#	0x74fc03	golang.org/x/sync/errgroup.(*Group).Go.func1+0x63		/home/alexw/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75

1 @ 0x43a576 0x44aff3 0x44afcd 0x466305 0x47fca5 0x47fadb 0x778a99 0x771a02 0x7719ee 0x771b39 0x77188f 0x7758c8 0x46a141
#	0x466304	sync.runtime_SemacquireMutex+0x24				/opt/go/src/runtime/sema.go:71
#	0x47fca4	sync.(*Mutex).lockSlow+0x164					/opt/go/src/sync/mutex.go:162
#	0x47fada	sync.(*Mutex).Lock+0x3a						/opt/go/src/sync/mutex.go:81
#	0x778a98	github.com/go-zeromq/zmq4.(*socket).scheduleRmConn+0x38		/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:334
#	0x771a01	github.com/go-zeromq/zmq4.(*Conn).notifyOnCloseError+0x41	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:500
#	0x7719ed	github.com/go-zeromq/zmq4.(*Conn).SetClosed+0x2d		/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:472
#	0x771b38	github.com/go-zeromq/zmq4.(*Conn).checkIO+0xf8			/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:492
#	0x77188e	github.com/go-zeromq/zmq4.(*Conn).read+0x68e			/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/conn.go:385
#	0x7758c7	github.com/go-zeromq/zmq4.(*routerQReader).listen+0x1a7		/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/router.go:161

1 @ 0x43a576 0x44aff3 0x44afcd 0x466305 0x47fca5 0x481296 0x481275 0x7782c5 0x777c5c 0x46a141
#	0x466304	sync.runtime_SemacquireMutex+0x24			/opt/go/src/runtime/sema.go:71
#	0x47fca4	sync.(*Mutex).lockSlow+0x164				/opt/go/src/sync/mutex.go:162
#	0x481295	sync.(*Mutex).Lock+0x35					/opt/go/src/sync/mutex.go:81
#	0x481274	sync.(*RWMutex).Lock+0x14				/opt/go/src/sync/rwmutex.go:139
#	0x7782c4	github.com/go-zeromq/zmq4.(*socket).addConn+0x64	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:285
#	0x777c5b	github.com/go-zeromq/zmq4.(*socket).accept+0x1fb	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:227

1 @ 0x43a576 0x44aff3 0x44afcd 0x466305 0x47fca5 0x775ea5 0x775e75 0x77897c 0x778f1d 0x46a141
#	0x466304	sync.runtime_SemacquireMutex+0x24			/opt/go/src/runtime/sema.go:71
#	0x47fca4	sync.(*Mutex).lockSlow+0x164				/opt/go/src/sync/mutex.go:162
#	0x775ea4	sync.(*Mutex).Lock+0x64					/opt/go/src/sync/mutex.go:81
#	0x775e74	github.com/go-zeromq/zmq4.(*routerMWriter).rmConn+0x34	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/router.go:211
#	0x77897b	github.com/go-zeromq/zmq4.(*socket).rmConn+0x23b	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:329
#	0x778f1c	github.com/go-zeromq/zmq4.(*socket).connReaper+0x17c	/home/alexw/go/pkg/mod/github.com/go-zeromq/[email protected]/socket.go:393
@tgbv
Copy link

tgbv commented Aug 15, 2022

some code sample would be useful in diagnosing it

@egorse
Copy link
Contributor

egorse commented May 16, 2024

Fixed by #149 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants