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

./ipfs diag cmds panics without daemon running #2760

Closed
haarts opened this issue May 25, 2016 · 1 comment
Closed

./ipfs diag cmds panics without daemon running #2760

haarts opened this issue May 25, 2016 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws) status/in-progress In progress

Comments

@haarts
Copy link

haarts commented May 25, 2016

I'm running IPFS 0.4.2. Immediately after installing I ran ./ipfs diag cmds which paniced:

me@there:~/go-ipfs$ ./ipfs diag cmds
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x584857]

goroutine 1 [running]:
panic(0xe4ae40, 0xc8200100c0)
        /home/whyrusleeping/go/src/runtime/panic.go:464 +0x3e6
github.com/ipfs/go-ipfs/commands.(*ReqLog).Report(0x0, 0x0, 0x0, 0x0)
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/commands/reqlog.go:108 +0x247
github.com/ipfs/go-ipfs/core/commands.glob.func1(0x767a7bae6868, 0xc8200c23c0, 0x767a7bae69f8, 0xc8200540e0)
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/core/commands/active.go:22 +0x3d
github.com/ipfs/go-ipfs/commands.(*Command).Call(0x16230c0, 0x767a7bae6868, 0xc8200c23c0, 0x0, 0x0)
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/commands/command.go:110 +0x472
main.callCommand(0x767a7bae6940, 0xc820016dc0, 0x767a7bae6868, 0xc8200c23c0, 0x16230c0, 0x1600320, 0x0, 0x0, 0x0, 0x0)
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:346 +0xa84
main.(*cmdInvocation).Run(0xc820016d80, 0x767a7bae6940, 0xc820016dc0, 0x0, 0x0, 0x0, 0x0)
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:189 +0x1e7
main.main()
        /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:154 +0x660

The daemon I had not started. Starting that and running the above command again yields proper output. An obvious oversight on my part, but I still think that it should not panic but return a proper error message instead.

@Kubuxu
Copy link
Member

Kubuxu commented May 25, 2016

Yeah, requiring daemon seems the best option here.

@Kubuxu Kubuxu self-assigned this May 25, 2016
@Kubuxu Kubuxu added kind/bug A bug in existing code (including security flaws) status/in-progress In progress labels May 25, 2016
@Kubuxu Kubuxu removed their assignment Aug 26, 2016
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) status/in-progress In progress
Projects
None yet
Development

No branches or pull requests

2 participants