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

goprocess panic when exiting early on startup #7027

Open
Stebalien opened this issue Mar 24, 2020 · 1 comment
Open

goprocess panic when exiting early on startup #7027

Stebalien opened this issue Mar 24, 2020 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

Version information:

0.5.0-dev

Description:

If we start shutting down before we finish starting the daemon, we'll panic when trying to register the plugin closer with the the node's process. The underlying issue is that there is no safe way to add a child process to a parent process outside of the parent processes main goroutine.

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Mar 24, 2020
@Stebalien
Copy link
Member Author

Mär 18 07:53:11 i3 ipfs[3089088]: Initializing daemon...
Mär 18 07:53:11 i3 ipfs[3089088]: go-ipfs version: 0.9.0-dev-3393b4a39
Mär 18 07:53:11 i3 ipfs[3089088]: Repo version: 11
Mär 18 07:53:11 i3 ipfs[3089088]: System version: amd64/linux
Mär 18 07:53:11 i3 ipfs[3089088]: Golang version: go1.16.2
Mär 18 07:55:35 i3 ipfs[3089088]: panic: Process cannot add children after being closed
Mär 18 07:55:35 i3 ipfs[3089088]: goroutine 1 [running]:
Mär 18 07:55:35 i3 ipfs[3089088]: github.com/jbenet/goprocess.(*process).AddChild(0xc002f89080, 0x55c0ad48cab0, 0xc003d289c0)
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:99 +0x2a5
Mär 18 07:55:35 i3 ipfs[3089088]: main.daemonFunc(0xc000914000, 0x55c0ad4798c8, 0xc00089bda0, 0x55c0ad30ca60, 0xc00089bd40, 0x0, 0x0)
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/src/go-ipfs/cmd/ipfs/daemon.go:396 +0x912
Mär 18 07:55:35 i3 ipfs[3089088]: github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0xc0000105d0, 0xc000914000, 0x55c0ad4798c8, 0xc00089bda0, 0x55c0ad30ca60, 0xc00089bd40, 0xc00089bda0, 0x0)
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/go/pkg/mod/github.com/ipfs/go-ipfs-cmds@v0.6.0/executor.go:77 +0x16b
Mär 18 07:55:35 i3 ipfs[3089088]: github.com/ipfs/go-ipfs-cmds/cli.Run(0x55c0ad4794d8, 0xc0006f2c80, 0x55c0ae03faa0, 0xc000180050, 0x5, 0x5, 0xc0001b6000, 0xc0001b6008, 0xc0001b6010, 0x55c0ad429528, ...)
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/go/pkg/mod/github.com/ipfs/go-ipfs-cmds@v0.6.0/cli/run.go:137 +0xac5
Mär 18 07:55:35 i3 ipfs[3089088]: main.mainRet(0x0)
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/src/go-ipfs/cmd/ipfs/main.go:168 +0x45e
Mär 18 07:55:35 i3 ipfs[3089088]: main.main()
Mär 18 07:55:35 i3 ipfs[3089088]:         /home/ruben/.cache/yay/go-ipfs-git/src/go-ipfs/cmd/ipfs/main.go:71 +0x25
Mär 18 07:55:35 i3 systemd[1]: ipfs.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mär 18 07:55:35 i3 systemd[1]: ipfs.service: Failed with result 'exit-code'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

1 participant