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

v1.2.0 snapshot import insta-crash #4925

Closed
karalabe opened this issue Nov 19, 2020 · 4 comments
Closed

v1.2.0 snapshot import insta-crash #4925

karalabe opened this issue Nov 19, 2020 · 4 comments
Assignees
Labels
kind/bug Kind: Bug P2 P2: Should be resolved

Comments

@karalabe
Copy link
Contributor

root@filecoin:~# lotus daemon --import-snapshot minimal_finality_stateroots_latest.car 
2020-11-19T19:23:39.146+0200	INFO	main	lotus/daemon.go:185	lotus repo: /root/.lotus
2020-11-19T19:23:39.147+0200	INFO	build	[email protected]/paramfetch.go:162	parameter and key-fetching complete
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x100ba02]

goroutine 1 [running]:
github.com/filecoin-project/lotus/lib/blockstore/badger.(*Blockstore).Close(0x0, 0x0, 0x0)
	/work/lotus/lib/blockstore/badger/blockstore.go:129 +0x42
github.com/ipfs/go-ipfs-blockstore.(*idstore).Close(0xc000a9c100, 0x3317b80, 0xc000a9c100)
	/root/go/pkg/mod/github.com/ipfs/[email protected]/idstore.go:120 +0x62
github.com/filecoin-project/lotus/node/repo.(*fsLockedRepo).Close(0xc00014c2c0, 0x20, 0x2e0c0c0)
	/work/lotus/node/repo/fsrepo.go:291 +0x2a2
main.ImportChain(0x32f2be0, 0xc00035d680, 0x7fff3659e607, 0x26, 0x1, 0x32c5a80, 0xc00011e080)
	/work/lotus/cmd/lotus/daemon.go:410 +0x2f0
main.glob..func3(0xc000355d80, 0x0, 0x0)
	/work/lotus/cmd/lotus/daemon.go:230 +0x8c8
github.com/urfave/cli/v2.(*App).RunAsSubcommand(0xc0006c2c00, 0xc0003558c0, 0x0, 0x0)
	/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:432 +0x9bf
github.com/urfave/cli/v2.(*Command).startApp(0x59311c0, 0xc0003558c0, 0x2e7a8e9, 0x7fff3659e5ee)
	/root/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x6bb
github.com/urfave/cli/v2.(*Command).Run(0x59311c0, 0xc0003558c0, 0x0, 0x0)
	/root/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:94 +0x9cd
github.com/urfave/cli/v2.(*App).RunContext(0xc0006c2a80, 0x33012e0, 0xc0000400c8, 0xc00003c080, 0x4, 0x4, 0x0, 0x0)
	/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:306 +0x81f
github.com/urfave/cli/v2.(*App).Run(...)
	/root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
github.com/filecoin-project/lotus/cli.RunApp(0xc0006c2a80)
	/work/lotus/cli/helper.go:35 +0x7c
main.main()
	/work/lotus/cmd/lotus/main.go:74 +0x645
@karalabe
Copy link
Contributor Author

FYI downgraded to 1.1.2 and import works fine, so it's a regression on the latest stable.

PS: Don't want to be an ass, but you guys should really start writing tests. You're gonna have a bad time unless you start repaying that tech debt.

@jennijuju jennijuju added kind/bug Kind: Bug P2 P2: Should be resolved labels Nov 19, 2020
@raulk
Copy link
Member

raulk commented Nov 19, 2020

Fixed in #4922, and merged to master. @karalabe, could you try on current master?

@raulk raulk closed this as completed Nov 19, 2020
@Kubuxu
Copy link
Contributor

Kubuxu commented Nov 19, 2020

Workaround for this is running lotus daemon for a second, Ctrl-C it and then importing the snapshot.

@raulk
Copy link
Member

raulk commented Nov 19, 2020

@karalabe completely agree on the repayment of technical debt being urgent. I was precisely talking about that yesterday, and issues like this just emphasise the need exponentially. It's in motion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug P2 P2: Should be resolved
Projects
None yet
Development

No branches or pull requests

4 participants