Skip to content

Run lotus daemon Runtime Error is invalid memory address or nil pointer dereference #5318

@vlongen

Description

@vlongen

Describe the bug
A clear and concise description of what the bug is.
When I run the command lotus daemon will have a error is invalid memory address or nil pointer dereference

To Reproduce
Steps to reproduce the behavior:

  1. Run lotus daemon
  2. See error
    invalid memory address or nil pointer dereference

Screenshots

root@iZm5e7weybcfpkamq0if1hZ:~# lotus daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xe1af53]

goroutine 1 [running]:
github.com/filecoin-project/lotus/chain/types.(*TipSet).Blocks(...)
        /www/server/lotus/chain/types/tipset.go:159
github.com/filecoin-project/lotus/chain/types.(*TipSet).MinTimestamp(0x0, 0x0)
        /www/server/lotus/chain/types/tipset.go:198 +0x13
github.com/filecoin-project/lotus/node/modules.waitForSync(0xc0a7076780, 0xa, 0xc0b67ee580)
        /www/server/lotus/node/modules/services.go:107 +0x45
github.com/filecoin-project/lotus/node/modules.HandleIncomingMessages(0x7fd72672c500, 0xc00066c870, 0x32763a0, 0xc00012d698, 0xc0b67d6000, 0xc0a7076780, 0xc0b67da2c0, 0x32d15e0, 0xc0b6e7b680, 0x2e37578, ...)
        /www/server/lotus/node/modules/services.go:188 +0x28c
reflect.Value.call(0x2b833a0, 0x30bab48, 0x13, 0x2e15462, 0x4, 0xc000229800, 0x8, 0x8, 0x32dbe20, 0x2a61fa0, ...)
        /usr/local/go/src/reflect/value.go:476 +0x8c7
reflect.Value.Call(0x2b833a0, 0x30bab48, 0x13, 0xc000229800, 0x8, 0x8, 0x8, 0xc0b67a37f0, 0xc000229800)
        /usr/local/go/src/reflect/value.go:337 +0xb9
go.uber.org/dig.defaultInvoker(0x2b833a0, 0x30bab48, 0x13, 0xc000229800, 0x8, 0x8, 0xc0000989b0, 0xc000229800, 0x8)
        /root/go/pkg/mod/go.uber.org/dig@v1.10.0/dig.go:284 +0x65
go.uber.org/dig.(*Container).Invoke(0xc0000989b0, 0x2b833a0, 0x30bab48, 0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/pkg/mod/go.uber.org/dig@v1.10.0/dig.go:439 +0x399
go.uber.org/fx.(*App).executeInvokes(0xc0001d6f20, 0x2a82ca0, 0xc00007a970)
        /root/go/pkg/mod/go.uber.org/fx@v1.9.0/app.go:547 +0x35f
go.uber.org/fx.New(0xc000bb5630, 0x3, 0x3, 0xc000a7f320)
        /root/go/pkg/mod/go.uber.org/fx@v1.9.0/app.go:345 +0x490
github.com/filecoin-project/lotus/node.New(0x32b0e20, 0xc000238900, 0xc000098050, 0x9, 0x9, 0x0, 0x0, 0x0)
        /www/server/lotus/node/builder.go:624 +0x49c
main.glob..func3(0xc000185440, 0x0, 0x0)
        /www/server/lotus/cmd/lotus/daemon.go:281 +0xef0
github.com/urfave/cli/v2.(*App).RunAsSubcommand(0xc000103080, 0xc000184f40, 0x0, 0x0)
        /root/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:432 +0x9bf
github.com/urfave/cli/v2.(*Command).startApp(0x5ab83a0, 0xc000184f40, 0x2e30005, 0x7ffcac2b968b)
        /root/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/command.go:279 +0x6bb
github.com/urfave/cli/v2.(*Command).Run(0x5ab83a0, 0xc000184f40, 0x0, 0x0)
        /root/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/command.go:94 +0x9cd
github.com/urfave/cli/v2.(*App).RunContext(0xc000102f00, 0x32b0da0, 0xc000044098, 0xc00000e080, 0x2, 0x2, 0x0, 0x0)
        /root/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:306 +0x81f
github.com/urfave/cli/v2.(*App).Run(...)
        /root/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:215
github.com/filecoin-project/lotus/cli.RunApp(0xc000102f00)
        /www/server/lotus/cli/helper.go:35 +0x7c
main.main()
        /www/server/lotus/cmd/lotus/main.go:74 +0x645

and see the logs is :

{"level":"warn","ts":"2021-01-10T14:05:26.739+0800","logger":"modules","caller":"modules/chain.go:118","msg":"loading chain state from disk: loading tipset: get block bafy2bzacedgx4znupibhok3kx3ekj4inj7any7t5kahptmitozuitupllmzoi: blockstore: block not found"}

how to fix it?

Version (run lotus version):
lotus version 1.4.0+git.32dcfb484

Additional context
Linux Ubuntu18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions