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-storage-miner fatal error #1930

Closed
diwufeiwen opened this issue Jun 5, 2020 · 1 comment · Fixed by #2126
Closed

lotus-storage-miner fatal error #1930

diwufeiwen opened this issue Jun 5, 2020 · 1 comment · Fixed by #2126

Comments

@diwufeiwen
Copy link
Contributor

Describe the bug:
fatal error: concurrent map read and map write

goroutine 780 [running]:
runtime.throw(0x2946e4e, 0x21)
/usr/local/go/src/runtime/panic.go:1112 +0x72 fp=0xc00a72bad8 sp=0xc00a72baa8 pc=0x544652
runtime.mapaccess1_fast64(0x2695720, 0xc0006d7f80, 0x2b9b, 0xc00af711a0)
/usr/local/go/src/runtime/map_fast64.go:21 +0x196 fp=0xc00a72bb00 sp=0xc00a72bad8 pc=0x5215e6
github.com/filecoin-project/lotus/chain/events.(*heightEvents).headChangeAt.func1(0x2b9b, 0xc00011abc0)
/builds/ForceMining/lotus-force/chain/events/events_height.go:40 +0x76 fp=0xc00a72bbe8 sp=0xc00a72bb00 pc=0x10decf6
github.com/filecoin-project/lotus/chain/events.(*heightEvents).headChangeAt(0xc007aba3f8, 0xc00798fff8, 0x1, 0x1, 0xc007c8a008, 0x1, 0x1, 0x0, 0x0)
/builds/ForceMining/lotus-force/chain/events/events_height.go:53 +0x407 fp=0xc00a72bd08 sp=0xc00a72bbe8 pc=0x10dd1c7
github.com/filecoin-project/lotus/chain/events.(*Events).headChange(0xc007aba3c0, 0xc00798fff8, 0x1, 0x1, 0xc007c8a008, 0x1, 0x1, 0x0, 0x0)
/builds/ForceMining/lotus-force/chain/events/events.go:185 +0xe4 fp=0xc00a72bd98 sp=0xc00a72bd08 pc=0x10dada4
github.com/filecoin-project/lotus/chain/events.(*Events).listenHeadChangesOnce(0xc007aba3c0, 0x2ced980, 0xc0006dc340, 0x0, 0x0)
/builds/ForceMining/lotus-force/chain/events/events.go:164 +0x5cd fp=0xc00a72bf20 sp=0xc00a72bd98 pc=0x10da88d

code:
func (e *heightEvents) headChangeAt(rev, app []*types.TipSet) error {
... ...
for _, ts := range rev {
revert := func(h abi.ChainEpoch, ts *types.TipSet) {
for _, tid := range e.htHeights[h] {
...
}
}

Branch:
interopnet

@magik6k magik6k added the bug label Jun 5, 2020
@embedSky
Copy link

I also got the same error. use the latest master run 2k localnet do pledge frequently

./lotus-storage-miner -v
lotus-storage-miner version 0.4.0+2k+git.c5bfd116.dirty

error log:

fatal error: concurrent map read and map write

goroutine 272 [running]:
runtime.throw(0x2797060, 0x21)
        /usr/lib/go-1.14/src/runtime/panic.go:1116 +0x72 fp=0xc00abcbad8 sp=0xc00abcbaa8 pc=0x562f92
runtime.mapaccess1_fast64(0x24dee60, 0xc00521a090, 0x7d1, 0xc00abcbb48)
        /usr/lib/go-1.14/src/runtime/map_fast64.go:21 +0x196 fp=0xc00abcbb00 sp=0xc00abcbad8 pc=0x53fdb6
github.com/filecoin-project/lotus/chain/events.(*heightEvents).headChangeAt.func1(0x7d1, 0xc007c69a40)
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events_height.go:40 +0x76 fp=0xc00abcbbe8 sp=0xc00abcbb00 pc=0x1166a96
github.com/filecoin-project/lotus/chain/events.(*heightEvents).headChangeAt(0xc000678308, 0xc006615000, 0x6a, 0x80, 0xc006615400, 0x6b, 0x80, 0x0, 0x0)
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events_height.go:53 +0x407 fp=0xc00abcbd08 sp=0xc00abcbbe8 pc=0x1164f67
github.com/filecoin-project/lotus/chain/events.(*Events).headChange(0xc0006782d0, 0xc006615000, 0x6a, 0x80, 0xc006615400, 0x6b, 0x80, 0x0, 0x0)
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events.go:185 +0xe4 fp=0xc00abcbd98 sp=0xc00abcbd08 pc=0x1162b44
github.com/filecoin-project/lotus/chain/events.(*Events).listenHeadChangesOnce(0xc0006782d0, 0x2b44300, 0xc001e3aac0, 0x0, 0x0)
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events.go:164 +0x5cd fp=0xc00abcbf20 sp=0xc00abcbd98 pc=0x116262d
github.com/filecoin-project/lotus/chain/events.(*Events).listenHeadChanges(0xc0006782d0, 0x2b44300, 0xc001e3aac0)
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events.go:104 +0xcf fp=0xc00abcbfc8 sp=0xc00abcbf20 pc=0x1161e7f
runtime.goexit()
        /usr/lib/go-1.14/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc00abcbfd0 sp=0xc00abcbfc8 pc=0x5960b1
created by github.com/filecoin-project/lotus/chain/events.NewEvents
        /home/jiaxing/jiaxing/filecoin-project/lotus/chain/events/events.go:93 +0x318 

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.

3 participants