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 #177

Closed
haarts opened this issue May 24, 2016 · 4 comments
Closed

./ipfs diag cmds panics #177

haarts opened this issue May 24, 2016 · 4 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@haarts
Copy link

haarts commented May 24, 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

I think I (conceptually) understand why this happened; no commands have been ran on this node (it's brand new), thus there's nothing to print. Still, a panic seems out of place.

@ghost
Copy link

ghost commented May 24, 2016

Thanks for running into this :) Does it still panic after the first API request has been made? E.g. to http://localhost:5001/api/v0/version.

@ghost ghost added the kind/bug A bug in existing code (including security flaws) label May 24, 2016
@haarts
Copy link
Author

haarts commented May 25, 2016

Yesterday night was probably not such a great time to start creating issues; first off I see I posted in the wrong repo, I was sure I checked... Second I didn't have the daemon running when I issued ./ipfs diag cmds. When I did have the daemon running this morning I got:

me@there:~/go-ipfs$ ./ipfs diag cmds
Command    Active  StartTime        RunTime
diag/cmds  true    May 25 08:55:46  696.373µs

I still think it shouldn't have paniced but this makes it a bit easier to explain.

Shall I close this issue and open up a new one in the correct repo?

@RichardLitt
Copy link
Member

@haarts Sounds good to me! Go ahead.

@haarts
Copy link
Author

haarts commented May 25, 2016

ipfs/kubo#2760

@haarts haarts closed this as completed May 25, 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)
Projects
None yet
Development

No branches or pull requests

2 participants