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

Lotus daemon crash: fatal error: concurrent map iteration and map write #2099

Closed
stefangeorgerobert opened this issue Jun 22, 2020 · 0 comments · Fixed by #2126
Closed

Lotus daemon crash: fatal error: concurrent map iteration and map write #2099

stefangeorgerobert opened this issue Jun 22, 2020 · 0 comments · Fixed by #2126

Comments

@stefangeorgerobert
Copy link

Describe the bug
Lotus daemon crashed.

To Reproduce

Expected behavior

Screenshots
2020-06-22T20:06:21.322Z WARN rpc [email protected]/handler.go:226 error in RPC call to 'Filecoin.ClientQueryAsk': failed to open stream to miner:
github.com/filecoin-project/go-fil-markets/storagemarket/impl.(*Client).GetAsk
/root/go/pkg/mod/github.com/filecoin-project/[email protected]/storagemarket/impl/client.go:156

  • routing: not found
    2020-06-22T20:06:23.062Z WARN storagemarket_network network/libp2p_impl.go:33 routing: not found
    2020-06-22T20:06:23.062Z WARN rpc [email protected]/handler.go:226 error in RPC call to 'Filecoin.ClientQueryAsk': failed to open stream to miner:
    github.com/filecoin-project/go-fil-markets/storagemarket/impl.(*Client).GetAsk
    /root/go/pkg/mod/github.com/filecoin-project/[email protected]/storagemarket/impl/client.go:156
  • routing: not found
    2020-06-22T20:06:24.188Z INFO sub sub/incoming.go:78 new block over pubsub {"cid": "bafy2bzaceczxqj4womaav67bk7wyhz4awxvggakd2jcuspdfksqtbkkpzuxze", "source": "12D3KooWNqyU3gz43XgRYFSE8ps1XBKWivW9H7dxzxiLpVUiZxz6", "msgfetch": 0.000466761}
    2020-06-22T20:06:24.197Z WARN chain chain/sync.go:599 Got block from the future, but within threshold1592856385 1592856384
    2020-06-22T20:06:24.329Z INFO provideradapter storageadapter/client.go:162 DEAL ACCEPTED!
    2020-06-22T20:06:24.386Z INFO provideradapter storageadapter/client.go:162 DEAL ACCEPTED!
    2020-06-22T20:06:24.475Z INFO provideradapter storageadapter/client.go:162 DEAL ACCEPTED!
    2020-06-22T20:06:24.496Z INFO chain chain/sync.go:554 block validation {"took": 0.298935868, "height": "20569"}
    2020-06-22T20:06:24.497Z INFO chainstore store/store.go:352 New heaviest tipset! [bafy2bzaceczxqj4womaav67bk7wyhz4awxvggakd2jcuspdfksqtbkkpzuxze] (height=20569)
    2020-06-22T20:06:24.521Z WARN chainstore store/store.go:197 chain head sub exit loop
    2020-06-22T20:06:24.521Z WARN chainstore store/store.go:197 chain head sub exit loop
    2020-06-22T20:06:24.526Z WARN chainstore store/store.go:197 chain head sub exit loop
    2020-06-22T20:06:24.532Z WARN chainstore store/store.go:197 chain head sub exit loop
    2020-06-22T20:06:24.532Z WARN chainstore store/store.go:197 chain head sub exit loop
    fatal error: concurrent map iteration and map write

goroutine 674 [running]:
runtime.throw(0x27a2079, 0x26)
/usr/lib/go-1.14/src/runtime/panic.go:1116 +0x72 fp=0xc01fbe9890 sp=0xc01fbe9860 pc=0x53fc52
runtime.mapiternext(0xc01fbe99d8)
/usr/lib/go-1.14/src/runtime/map.go:853 +0x552 fp=0xc01fbe9910 sp=0xc01fbe9890 pc=0x51aa92
github.com/filecoin-project/lotus/chain/events.(*calledEvents).checkNewCalls.func1(0xc0024f83f0)
/root/lotus/chain/events/events_called.go:138 +0x118 fp=0xc01fbe9a48 sp=0xc01fbe9910 pc=0x10a7168
github.com/filecoin-project/lotus/chain/events.(*calledEvents).messagesForTs(0xc0005fae90, 0xc028000800, 0xc01fbe9ca0)
/root/lotus/chain/events/events_called.go:278 +0x18a fp=0xc01fbe9c40 sp=0xc01fbe9a48 pc=0x10a4c5a
github.com/filecoin-project/lotus/chain/events.(*calledEvents).checkNewCalls(0xc0005fae90, 0xc014ef7040)
/root/lotus/chain/events/events_called.go:135 +0x1a4 fp=0xc01fbe9cc8 sp=0xc01fbe9c40 pc=0x10a3f64
github.com/filecoin-project/lotus/chain/events.(*calledEvents).headChangeCalled(0xc0005fae90, 0x0, 0x0, 0x0, 0xc03a9e0be8, 0x1, 0x1, 0x0, 0x0)
/root/lotus/chain/events/events_called.go:94 +0xf6 fp=0xc01fbe9d08 sp=0xc01fbe9cc8 pc=0x10a3916
github.com/filecoin-project/lotus/chain/events.(*Events).headChange(0xc0005fae10, 0x0, 0x0, 0x0, 0xc03a9e0be8, 0x1, 0x1, 0x0, 0x0)
/root/lotus/chain/events/events.go:189 +0x189 fp=0xc01fbe9d98 sp=0xc01fbe9d08 pc=0x10a3719
github.com/filecoin-project/lotus/chain/events.(*Events).listenHeadChangesOnce(0xc0005fae10, 0x2b41b60, 0xc000044090, 0x0, 0x0)
/root/lotus/chain/events/events.go:164 +0x5cd fp=0xc01fbe9f20 sp=0xc01fbe9d98 pc=0x10a315d
github.com/filecoin-project/lotus/chain/events.(*Events).listenHeadChanges(0xc0005fae10, 0x2b41b60, 0xc000044090)
/root/lotus/chain/events/events.go:104 +0xcf fp=0xc01fbe9fc8 sp=0xc01fbe9f20 pc=0x10a29af
runtime.goexit()
/usr/lib/go-1.14/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc01fbe9fd0 sp=0xc01fbe9fc8 pc=0x572d71
created by github.com/filecoin-project/lotus/chain/events.NewEvents
/root/lotus/chain/events/events.go:93 +0x318

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7fd415f5e8b8, 0x72, 0x0)
/usr/lib/go-1.14/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc000431018, 0x72, 0x0, 0x0, 0x2768412)
/usr/lib/go-1.14/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
/usr/lib/go-1.14/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000431000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go-1.14/src/internal/poll/fd_unix.go:384 +0x1d4
net.(*netFD).accept(0xc000431000, 0xef45df, 0x2721800, 0xc013798b10)
/usr/lib/go-1.14/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc002803160, 0x2b619e0, 0x203006, 0x203006)
/usr/lib/go-1.14/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc002803160, 0x7fd4404f5238, 0xc00da715e8, 0x517846, 0xc018eed5e0)
/usr/lib/go-1.14/src/net/tcpsock.go:261 +0x64
github.com/multiformats/go-multiaddr-net.(*maListener).Accept(0xc0028031e0, 0x451e59f10b08d50, 0x5ef10f40, 0xc00da715e8, 0x598d66)
/root/go/pkg/mod/github.com/multiformats/[email protected]/net.go:243 +0x37
github.com/multiformats/go-multiaddr-net.(*netListenerAdapter).Accept(0xc002ade2f0, 0xc00da71638, 0x18, 0xc000000180, 0x8edefc)
/root/go/pkg/mod/github.com/multiformats/[email protected]/net.go:222 +0x33
net/http.(*Server).Serve(0xc00207c0e0, 0x2b386e0, 0xc002ade2f0, 0x0, 0x0)
/usr/lib/go-1.14/src/net/http/server.go:2901 +0x25d
main.serveRPC(0x2b76ce0, 0xc0000ea500, 0xc00276b270, 0x2b619e0, 0xc002a36500, 0xc00008e900, 0x0, 0x0)
/root/lotus/cmd/lotus/rpc.go:83 +0x5c8
main.glob..func2(0xc00040a6c0, 0x0, 0x0)
/root/lotus/cmd/lotus/daemon.go:261 +0x11db
github.com/urfave/cli/v2.(*App).RunAsSubcommand(0xc0003aa600, 0xc00040a300, 0x0, 0x0)
/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:432 +0x993
github.com/urfave/cli/v2.(*Command).startApp(0x4ed90c0, 0xc00040a300, 0x7fff1cec07b9, 0x6)
/root/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x68c
github.com/urfave/cli/v2.(*Command).Run(0x4ed90c0, 0xc00040a300, 0x0, 0x0)
/root/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:94 +0xa12
github.com/urfave/cli/v2.(*App).RunContext(0xc0003aa480, 0x2b41b60, 0xc000044088, 0xc00000e0a0, 0x2, 0x2, 0x0, 0x0)
/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:306 +0x814
github.com/urfave/cli/v2.(*App).Run(...)
/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
main.main()
/root/lotus/cmd/lotus/main.go:72 +0x677

Version (run lotus --version):
lotus version 0.4.0+git.bead3bf4.dirty
Additional context

@magik6k magik6k added the bug label Jun 24, 2020
Kubuxu pushed a commit that referenced this issue Jun 24, 2020
Also race fix: depends on ipfs/go-blockservice#65
Resolves #2092, #2099, #2108, #1930, #2110

Signed-off-by: Jakub Sztandera <[email protected]>
@Kubuxu Kubuxu linked a pull request Jun 24, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants