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

fatal error: concurrent map read and map write #278

Closed
dekz opened this issue Jul 18, 2019 · 0 comments · Fixed by #279
Assignees
Labels
bug

Comments

@dekz
Copy link
Member

@dekz dekz commented Jul 18, 2019

After running mesh for an extended period I encountered the following crash:

{"direction":1,"level":"debug","msg":"found peer who speaks our protocol","peerID":"QmVGX47BzePPqEzpkTwfUJogPZxHcifpSXsGdgyHjtk5t7","protocol":"/meshsub/1.0.0","time":"2019-07-17T10:25:10Z"}
{"count":6,"level":"debug","msg":"received AddOrders request via RPC","time":"2019-07-17T10:25:10Z"}
{"count":6,"level":"debug","msg":"received AddOrders request via RPC","time":"2019-07-17T10:25:13Z"}
{"count":6,"level":"debug","msg":"received AddOrders request via RPC","time":"2019-07-17T10:25:16Z"}
{"count":6,"level":"debug","msg":"received AddOrders request via RPC","time":"2019-07-17T10:25:19Z"}
fatal error: concurrent map read and map write

goroutine 64 [running]:
runtime.throw(0xeb74c4, 0x21)
    /usr/local/go/src/runtime/panic.go:617 +0x72 fp=0xc0013e50d8 sp=0xc0013e50a8 pc=0x433a42
runtime.mapaccess2(0xd563e0, 0xc0001b43c0, 0xc0013e5228, 0x199dfe0, 0xc001fdc600)
    /usr/local/go/src/runtime/map.go:472 +0x284 fp=0xc0013e5120 sp=0xc0013e50d8 pc=0x413f34
github.com/0xProject/0x-mesh/zeroex/orderwatch.(*Decoder).FindEventType(0xc0000f6000, 0xc10d63adca56bc67, 0xe9c8ad40a5149b71, 0xc3258396, 0xc000c6ba80, 0x3, 0x4, 0xc001fddb20, 0x20, 0x20, ...)
    /go/src/github.com/0xProject/0x-mesh/zeroex/orderwatch/event_decoder.go:253 +0x570 fp=0xc0013e5220 sp=0xc0013e5120 pc=0xc15340
github.com/0xProject/0x-mesh/zeroex/orderwatch.(*Watcher).setupEventWatcher.func1(0xc000358820, 0xc000421320)
    /go/src/github.com/0xProject/0x-mesh/zeroex/orderwatch/order_watcher.go:305 +0x133 fp=0xc0013e5fd0 sp=0xc0013e5220 pc=0xc1dbe3
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0013e5fd8 sp=0xc0013e5fd0 pc=0x460681
created by github.com/0xProject/0x-mesh/zeroex/orderwatch.(*Watcher).setupEventWatcher
    /go/src/github.com/0xProject/0x-mesh/zeroex/orderwatch/order_watcher.go:286 +0xa2

goroutine 1 [select (no cases), 1945 minutes]:
main.main()
    /go/src/github.com/0xProject/0x-mesh/cmd/mesh/main.go:57 +0x1ec

goroutine 20 [chan receive, 1945 minutes]:
github.com/0xProject/0x-mesh/vendor/github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch(0xc0000aa840, 0xc0000aa780)
    /go/src/github.com/0xProject/0x-mesh/vendor/github.com/rjeczalik/notify/tree_nonrecursive.go:36 +0xb6
created by github.com/0xProject/0x-mesh/vendor/github.com/rjeczalik/notify.newNonrecursiveTree
    /go/src/github.com/0xProject/0x-mesh/vendor/github.com/rjeczalik/notify/tree_nonrecursive.go:29 +0xdd

This was on a pre-beta release. Now updated to latest to see if this re-occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.