Node panics, instead on returning error when FullNodeProxy is called with empty nodes. #12931
Open
4 of 11 tasks
Labels
kind/bug
Kind: Bug
Checklist
Latest release
, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.Lotus component
Lotus Version
Repro Steps
During one of our Antithesis runs, due to connectivity issues. It called FullNodeProxy with 0 set of nodes, which in turn lead to panic rather than an error. We should probably fail much earlier.
Describe the Bug
events (7).log
panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/filecoin-project/lotus/cli/util.FullNodeProxy[...].func1.1() cli/util/api.go:281 +0x2c5 github.com/filecoin-project/lotus/lib/retry.Retry[...]({0x7e03220, 0xa4ef1e0}, 0x5, 0x3b9aca00, {0xc0005bed18, 0x2, 0x2}, 0xc0005bed58) lib/retry/retry.go:21 +0x1be github.com/filecoin-project/lotus/cli/util.FullNodeProxy[...].func1() cli/util/api.go:279 +0x305 github.com/filecoin-project/lotus/api.(*CommonStruct).Version(0xc00056c908, {0x7e03220, 0xa4ef1e0}) api/proxy_gen.go:1342 +0x68 github.com/filecoin-project/lotus/cli/util.GetFullNodeAPIV1(0xc00021f4c0, {0x0, 0x0, 0x3?}) cli/util/api.go:394 +0x890 github.com/filecoin-project/lotus/cli/miner.init.func10(0xc00021f4c0) cli/miner/run.go:77 +0x6c6 github.com/urfave/cli/v2.(*Command).Run(0xa2ff520, 0xc00021f4c0, {0xc00008ada0, 0x2, 0x2}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.5/command.go:274 +0x7a2 github.com/urfave/cli/v2.(*Command).Run(0xc000480dc0, 0xc00021f180, {0xc00011c5a0, 0x3, 0x3}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.5/command.go:267 +0xa25 github.com/urfave/cli/v2.(*App).RunContext(0xc0005ec1e0, {0x7e03220, 0xa4ef1e0}, {0xc00011c5a0, 0x3, 0x3}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.5/app.go:332 +0x566 github.com/urfave/cli/v2.(*App).Run(...) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.5/app.go:309 github.com/filecoin-project/lotus/cli.RunApp(0xc0005ec1e0) cli/helper.go:49 +0x116 main.main() cmd/lotus-miner/main.go:10 +0x25
Logging Information
The text was updated successfully, but these errors were encountered: