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

Maybe a deadlock in p2p? #703

Closed
karalabe opened this issue Apr 13, 2015 · 11 comments
Closed

Maybe a deadlock in p2p? #703

karalabe opened this issue Apr 13, 2015 · 11 comments
Assignees

Comments

@karalabe
Copy link
Member

Hey all,

I'm running some custom whisper tests on develop, and one of my tests always hangs when shutting down a few P2P server instances. I am Start()-ing two p2p.Server-s, wiring them together with SuggestPeer(), and Stop()-ing them afterwards. The first successfully terminates, but the second stop hangs. Am I doing something that I shouldn't be, or is this really a bug?

Here's a forced dump if someone with a bit more experience can spot an issue (note, the first goroutine in the below list is just the forced panic):

goroutine 81 [running]:
github.com/ethereum/go-ethereum/whisper.func·006()
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper_test.go:152 +0x72
created by github.com/ethereum/go-ethereum/whisper.TestDirectMessage
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper_test.go:153 +0x694

goroutine 1 [chan receive]:
testing.RunTests(0x8f5b30, 0xc18240, 0x9, 0x9, 0x7f9b6c101201)
        /opt/google/go/src/testing/testing.go:556 +0xad6
testing.(*M).Run(0xc20803cf50, 0xc3c7c0)
        /opt/google/go/src/testing/testing.go:485 +0x6c
main.main()
        github.com/ethereum/go-ethereum/whisper/_test/_testmain.go:68 +0x1d5

goroutine 5 [chan receive]:
github.com/ethereum/go-ethereum/logger/glog.(*loggingT).flushDaemon(0xc34be0)
        /work/src/github.com/ethereum/go-ethereum/logger/glog/glog.go:897 +0x78
created by github.com/ethereum/go-ethereum/logger/glog.init·1
        /work/src/github.com/ethereum/go-ethereum/logger/glog/glog.go:428 +0x77

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /opt/google/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 6 [select]:
github.com/ethereum/go-ethereum/logger.dispatchLoop()
        /work/src/github.com/ethereum/go-ethereum/logger/sys.go:65 +0x6d1
created by github.com/ethereum/go-ethereum/logger.init·1
        /work/src/github.com/ethereum/go-ethereum/logger/sys.go:44 +0x25

goroutine 33 [semacquire]:
sync.(*WaitGroup).Wait(0xc20807f2f8)
        /opt/google/go/src/sync/waitgroup.go:132 +0x169
github.com/ethereum/go-ethereum/p2p.(*Server).Stop(0xc20807f200)
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:266 +0x2c4
github.com/ethereum/go-ethereum/whisper.stopNodes(0xc20802cec0, 0x2, 0x2)
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper_test.go:61 +0x66
github.com/ethereum/go-ethereum/whisper.TestDirectMessage(0xc2080d0750)
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper_test.go:155 +0x697
testing.tRunner(0xc2080d0750, 0xc18300)
        /opt/google/go/src/testing/testing.go:447 +0xbf
created by testing.RunTests
        /opt/google/go/src/testing/testing.go:555 +0xa8b

goroutine 16 [select]:
github.com/ethereum/go-ethereum/event/filter.(*Filters).loop(0xc20807ab20)
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:57 +0x2f1
created by github.com/ethereum/go-ethereum/event/filter.(*Filters).Start
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:32 +0x32

goroutine 34 [select]:
github.com/ethereum/go-ethereum/event/filter.(*Filters).loop(0xc20807b8a0)
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:57 +0x2f1
created by github.com/ethereum/go-ethereum/event/filter.(*Filters).Start
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:32 +0x32

goroutine 25 [IO wait]:
net.(*pollDesc).Wait(0xc2080e5bf0, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080e5bf0, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).readFrom(0xc2080e5b90, 0xc20802d180, 0xc, 0xc, 0x0, 0x0, 0x0, 0x7f9b6c10dc70, 0xc20802d5e0)
        /opt/google/go/src/net/fd_unix.go:269 +0x4a1
net.(*UDPConn).ReadFromUDP(0xc20803a070, 0xc20802d180, 0xc, 0xc, 0x2, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/udpsock_posix.go:67 +0x124
github.com/jackpal/go-nat-pmp.(*Client).rpc(0xc20800bd80, 0xc2080eeede, 0x2, 0x2, 0xc, 0xc20802d180, 0xc, 0xc, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:126 +0x37a
github.com/jackpal/go-nat-pmp.(*Client).GetExternalAddress(0xc20800bd80, 0x0, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:50 +0xc8
github.com/ethereum/go-ethereum/p2p/nat.func·006()
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:57 +0xa5
created by github.com/ethereum/go-ethereum/p2p/nat.discoverPMP
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:62 +0x1a1

goroutine 48 [select]:
github.com/ethereum/go-ethereum/event/filter.(*Filters).loop(0xc20807be40)
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:57 +0x2f1
created by github.com/ethereum/go-ethereum/event/filter.(*Filters).Start
        /work/src/github.com/ethereum/go-ethereum/event/filter/filter.go:32 +0x32

goroutine 42 [IO wait]:
net.(*pollDesc).Wait(0xc2080e4450, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080e4450, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).readFrom(0xc2080e43f0, 0xc20802d540, 0xc, 0xc, 0x0, 0x0, 0x0, 0x7f9b6c10dc70, 0xc20802cff0)
        /opt/google/go/src/net/fd_unix.go:269 +0x4a1
net.(*UDPConn).ReadFromUDP(0xc20803a080, 0xc20802d540, 0xc, 0xc, 0x2, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/udpsock_posix.go:67 +0x124
github.com/jackpal/go-nat-pmp.(*Client).rpc(0xc20807bce0, 0xc2080efede, 0x2, 0x2, 0xc, 0xc20802d540, 0xc, 0xc, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:126 +0x37a
github.com/jackpal/go-nat-pmp.(*Client).GetExternalAddress(0xc20807bce0, 0x0, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:50 +0xc8
github.com/ethereum/go-ethereum/p2p/nat.func·006()
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:57 +0xa5
created by github.com/ethereum/go-ethereum/p2p/nat.discoverPMP
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:62 +0x1a1

goroutine 58 [select]:
github.com/ethereum/go-ethereum/p2p/discover.(*udp).loop(0xc2080c6000)
        /work/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:278 +0xb53
created by github.com/ethereum/go-ethereum/p2p/discover.newUDP
        /work/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:180 +0x4a8

goroutine 50 [select]:
github.com/ethereum/go-ethereum/p2p/nat.Map(0x7f9b6c111068, 0xc20809c810, 0xc208106180, 0x83a7b0, 0x3, 0x765d, 0x765d, 0x86cdb0, 0x12)
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/nat.go:97 +0xa3f
created by github.com/ethereum/go-ethereum/p2p/discover.newUDP
        /work/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:172 +0x2ce

goroutine 59 [IO wait]:
net.(*pollDesc).Wait(0xc2080e4140, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080e4140, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).readFrom(0xc2080e40e0, 0xc208102000, 0x1000, 0x1000, 0x0, 0x0, 0x0, 0x7f9b6c10dc70, 0xc20802d1a8)
        /opt/google/go/src/net/fd_unix.go:269 +0x4a1
net.(*UDPConn).ReadFromUDP(0xc20803a0e0, 0xc208102000, 0x1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/udpsock_posix.go:67 +0x124
github.com/ethereum/go-ethereum/p2p/discover.(*udp).readLoop(0xc2080c6000)
        /work/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:372 +0x116
created by github.com/ethereum/go-ethereum/p2p/discover.newUDP
        /work/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:181 +0x4c5

goroutine 62 [select]:
github.com/ethereum/go-ethereum/p2p.(*Server).dialLoop(0xc208001c20)
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:335 +0x686
created by github.com/ethereum/go-ethereum/p2p.(*Server).Start
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:210 +0xa3e

goroutine 69 [IO wait]:
net.(*pollDesc).Wait(0xc2081184c0, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2081184c0, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208118460, 0xc208092920, 0x20, 0x20, 0x0, 0x7f9b6c10dc70, 0xc20802de00)
        /opt/google/go/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20803a0f8, 0xc208092920, 0x20, 0x20, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/net.go:121 +0xdc
io.ReadAtLeast(0x7f9b6c116f80, 0xc20803a0f8, 0xc208092920, 0x20, 0x20, 0x20, 0x0, 0x0, 0x0)
        /opt/google/go/src/io/io.go:298 +0xf1
io.ReadFull(0x7f9b6c116f80, 0xc20803a0f8, 0xc208092920, 0x20, 0x20, 0x20, 0x0, 0x0)
        /opt/google/go/src/io/io.go:316 +0x6d
github.com/ethereum/go-ethereum/p2p.(*rlpxFrameRW).ReadMsg(0xc2081079e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/p2p/rlpx.go:108 +0x11f
github.com/ethereum/go-ethereum/p2p.(*netWrapper).ReadMsg(0xc208155100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/p2p/message.go:109 +0x16b
github.com/ethereum/go-ethereum/p2p.(*Peer).readLoop(0xc2080963c0, 0xc208096480)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:189 +0x8a
created by github.com/ethereum/go-ethereum/p2p.(*Peer).run
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:121 +0x97

goroutine 61 [select]:
github.com/ethereum/go-ethereum/p2p/nat.Map(0x7f9b6c111068, 0xc20809c810, 0xc2081060c0, 0x83a150, 0x3, 0x765d, 0x765d, 0x84ecd0, 0xc)
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/nat.go:97 +0xa3f
github.com/ethereum/go-ethereum/p2p.func·004()
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:233 +0x8f
created by github.com/ethereum/go-ethereum/p2p.(*Server).startListening
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:235 +0x309

goroutine 60 [IO wait]:
net.(*pollDesc).Wait(0xc2080e47d0, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080e47d0, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080e4770, 0x0, 0x7f9b6c10dc70, 0xc20802d290)
        /opt/google/go/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20803a140, 0x7f9b6c0fc000, 0x0, 0x0)
        /opt/google/go/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20803a140, 0x0, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/tcpsock_posix.go:244 +0x4c
github.com/ethereum/go-ethereum/p2p.(*Server).listenLoop(0xc208001c20)
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:289 +0x32e
created by github.com/ethereum/go-ethereum/p2p.(*Server).startListening
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:229 +0x226

goroutine 74 [select]:
github.com/ethereum/go-ethereum/p2p.(*Peer).pingLoop(0xc2080969c0)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:174 +0x25a
created by github.com/ethereum/go-ethereum/p2p.(*Peer).run
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:122 +0xb4

goroutine 57 [IO wait]:
net.(*pollDesc).Wait(0xc2080e4680, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080e4680, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).readFrom(0xc2080e4620, 0xc20802cf10, 0xc, 0xc, 0x0, 0x0, 0x0, 0x7f9b6c10dc70, 0xc20802d5f0)
        /opt/google/go/src/net/fd_unix.go:269 +0x4a1
net.(*UDPConn).ReadFromUDP(0xc20803a130, 0xc20802cf10, 0xc, 0xc, 0x2, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/udpsock_posix.go:67 +0x124
github.com/jackpal/go-nat-pmp.(*Client).rpc(0xc2080a0fc0, 0xc2080ebede, 0x2, 0x2, 0xc, 0xc20802cf10, 0xc, 0xc, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:126 +0x37a
github.com/jackpal/go-nat-pmp.(*Client).GetExternalAddress(0xc2080a0fc0, 0x0, 0x0, 0x0)
        /work/src/github.com/jackpal/go-nat-pmp/natpmp.go:50 +0xc8
github.com/ethereum/go-ethereum/p2p/nat.func·006()
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:57 +0xa5
created by github.com/ethereum/go-ethereum/p2p/nat.discoverPMP
        /work/src/github.com/ethereum/go-ethereum/p2p/nat/natpmp.go:62 +0x1a1

goroutine 73 [IO wait]:
net.(*pollDesc).Wait(0xc208118a70, 0x72, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208118a70, 0x0, 0x0)
        /opt/google/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208118a10, 0xc208092c40, 0x20, 0x20, 0x0, 0x7f9b6c10dc70, 0xc208074790)
        /opt/google/go/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20803a078, 0xc208092c40, 0x20, 0x20, 0x0, 0x0, 0x0)
        /opt/google/go/src/net/net.go:121 +0xdc
io.ReadAtLeast(0x7f9b6c116f80, 0xc20803a078, 0xc208092c40, 0x20, 0x20, 0x20, 0x0, 0x0, 0x0)
        /opt/google/go/src/io/io.go:298 +0xf1
io.ReadFull(0x7f9b6c116f80, 0xc20803a078, 0xc208092c40, 0x20, 0x20, 0x20, 0x0, 0x0)
        /opt/google/go/src/io/io.go:316 +0x6d
github.com/ethereum/go-ethereum/p2p.(*rlpxFrameRW).ReadMsg(0xc208096060, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/p2p/rlpx.go:108 +0x11f
github.com/ethereum/go-ethereum/p2p.(*netWrapper).ReadMsg(0xc208155640, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/p2p/message.go:109 +0x16b
github.com/ethereum/go-ethereum/p2p.(*Peer).readLoop(0xc2080969c0, 0xc208096a80)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:189 +0x8a
created by github.com/ethereum/go-ethereum/p2p.(*Peer).run
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:121 +0x97

goroutine 68 [semacquire]:
sync.(*WaitGroup).Wait(0xc2080963e8)
        /opt/google/go/src/sync/waitgroup.go:132 +0x169
github.com/ethereum/go-ethereum/p2p.(*Peer).run(0xc2080963c0, 0x7f9b6c119aa8)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:145 +0x1fc
github.com/ethereum/go-ethereum/p2p.(*Server).runPeer(0xc20807f200, 0xc2080963c0)
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:427 +0x379
created by github.com/ethereum/go-ethereum/p2p.(*Server).startPeer
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:413 +0x6c9

goroutine 72 [select]:
github.com/ethereum/go-ethereum/p2p.(*Peer).run(0xc2080969c0, 0x7f9b6c119aa8)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:128 +0x50f
github.com/ethereum/go-ethereum/p2p.(*Server).runPeer(0xc208001c20, 0xc2080969c0)
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:427 +0x379
created by github.com/ethereum/go-ethereum/p2p.(*Server).startPeer
        /work/src/github.com/ethereum/go-ethereum/p2p/server.go:413 +0x6c9

goroutine 75 [select]:
github.com/ethereum/go-ethereum/p2p.(*protoRW).ReadMsg(0xc208114460, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:312 +0x1bb
github.com/ethereum/go-ethereum/whisper.(*Whisper).msgHandler(0xc2080e45b0, 0xc2080969c0, 0x7f9b6c119c00, 0xc208114460, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper.go:164 +0x11d
github.com/ethereum/go-ethereum/whisper.*Whisper.(github.com/ethereum/go-ethereum/whisper.msgHandler)·fm(0xc2080969c0, 0x7f9b6c119c00, 0xc208114460, 0x0, 0x0)
        /work/src/github.com/ethereum/go-ethereum/whisper/whisper.go:69 +0x57
github.com/ethereum/go-ethereum/p2p.func·003()
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:257 +0x88
created by github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols
        /work/src/github.com/ethereum/go-ethereum/p2p/peer.go:266 +0x2eb

goroutine 77 [select]:
github.com/ethereum/go-ethereum/whisper.(*peer).update(0xc2080cd290)
        /work/src/github.com/ethereum/go-ethereum/whisper/peer.go:54 +0x2aa
created by github.com/ethereum/go-ethereum/whisper.(*peer).start
        /work/src/github.com/ethereum/go-ethereum/whisper/peer.go:40 +0x32
@fjl fjl self-assigned this Apr 13, 2015
@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Could you please point me to the code that is causing this? From the trace, it looks like there are multiple servers, one that is currently stopping and one that's still live.

@karalabe
Copy link
Member Author

This is caused with my existing tests, I haven't yet rewritten them to use p2p.NewPeer / p2p.MsgPipe. But here's the code: https://github.com/karalabe/go-ethereum/blob/whisper-cleanup/whisper/whisper_test.go#L106

@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Trying them now.

@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Your branch is based on an old-ish (last week) commit. I fixed this issue in f1d710a.

@fjl fjl closed this as completed Apr 13, 2015
@karalabe
Copy link
Member Author

Not really, even though that particular branch did indeed not contain your fix, if I merge the current develop branch with my test is still hangs. I'll try and prepare a clean repro branch.

@karalabe
Copy link
Member Author

Could you please verify this branch? https://github.com/karalabe/go-ethereum/tree/p2p-hang-repro

I am experiencing the same lockup and as far as I see here all the fixes are already included.

@karalabe
Copy link
Member Author

I am seeing a hang on this waitgroup: https://github.com/ethereum/go-ethereum/blob/develop/p2p/peer.go#L145

Specifically, the readLoop doesn't terminate.

@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Yes, seeing it.

@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Found it. Will submit a fix later today.

@karalabe
Copy link
Member Author

Great :) I'm off for today, but will check it out in the morning.

@fjl
Copy link
Contributor

fjl commented Apr 13, 2015

Please retry when #704 is merged. Your test no longer hangs on my machine after merging this PR locally.

@fjl fjl reopened this Apr 13, 2015
ngtuna added a commit to ngtuna/tomochain that referenced this issue Sep 16, 2019
…-unit-tests

Make sure unit tests passed on tomoX branch
tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this issue Jan 20, 2022
* docker: adds sleep 1 before running geth

* scripts: docker should now exit using CTRL+c
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

2 participants