filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.82k stars 1.25k forks source link

Disabled IndexProvider causes "panic: runtime error: invalid memory address or nil pointer dereference" - v1.17.0.rc1 #8916

Closed donkabat closed 2 years ago

donkabat commented 2 years ago

Checklist

Lotus component

Lotus Version

lotus-miner version 1.17.0-rc1+calibnet+git.d2fe153e3

Describe the Bug

I'm not able to run lotus miner with disabled IndexProvider.

New lotus-miner's installation & calibnet. Before first run I set config.toml: [IndexProvider] Enable = false

It worked for a day and next it didnt want to run after restart. Probably it was the first restart after first storage deal.

Logging Information

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x2013e37]

goroutine 15347 [running]:
github.com/filecoin-project/index-provider/engine.(*Engine).Start(0xc00ef98770, {0x43aa8c0, 0xc000f432f0})
        /home/filecoin/go/pkg/mod/github.com/filecoin-project/index-provider@v0.6.1/engine/engine.go:123 +0x437
github.com/filecoin-project/lotus/node/modules.IndexProvider.func1.1({0x43aa8c0, 0xc000f432f0})
        /home/filecoin/networks/calibration/build/lotus/node/modules/storageminer_idxprov.go:97 +0x34
go.uber.org/fx/internal/lifecycle.(*Lifecycle).runStartHook(0xc00034c8c0, {0x43aa8c0, 0xc000f432f0}, {0xc00ef873a0, 0xc00ef873b0, {{0xc00dde4370, 0x42}, {0x7e2cb8f, 0x54}, 0x5c}})
        /home/filecoin/go/pkg/mod/go.uber.org/fx@v1.15.0/internal/lifecycle/lifecycle.go:118 +0x1fd
go.uber.org/fx/internal/lifecycle.(*Lifecycle).Start(0xc00034c8c0, {0x43aa8c0, 0xc000f432f0})
        /home/filecoin/go/pkg/mod/go.uber.org/fx@v1.15.0/internal/lifecycle/lifecycle.go:83 +0x2a5
go.uber.org/fx.(*App).start(0xc001086c30, {0x43aa8c0, 0xc000f432f0})
        /home/filecoin/go/pkg/mod/go.uber.org/fx@v1.15.0/app.go:745 +0x36
go.uber.org/fx.withTimeout.func1()
        /home/filecoin/go/pkg/mod/go.uber.org/fx@v1.15.0/app.go:977 +0x32
created by go.uber.org/fx.withTimeout
        /home/filecoin/go/pkg/mod/go.uber.org/fx@v1.15.0/app.go:977 +0xf1

Repo Steps

No response

donkabat commented 2 years ago

After change to v1.16.0 the error is gone. On v1.17.0_rc1 still the same.

rjan90 commented 2 years ago

Hey @donkabat Thank you so much for the issue-report! This should and must be fixed before the final release is cut. I have raised the issue to the devs, and will come back to you later when we have found a solution.

I will repro tomorrow to confirm that I see this on my side as well!

masih commented 2 years ago

Fixed already in index-provider version 0.7.0 and later. The fix in lotus requires upgrading index-provider dependency. This is currently in progress pending transient dependency upgrades for go-cid 0.2.0 which is unrelated to index-provider.

rjan90 commented 2 years ago

Closing this since the index-provider version has been upgraded in the lotus v1.17.1-rc2 version which should resolve this issue. If you are experiencing this problem on the newer release candidate / versions - please open a new ticket!

Thanks again for the ticket.