Ipfs: ./ipfs diag cmds panics

Created on 24 May 2016  ·  4Comments  ·  Source: ipfs/ipfs

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.

kinbug

All 4 comments

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.

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?

@haarts Sounds good to me! Go ahead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbenet picture jbenet  ·  76Comments

daviddias picture daviddias  ·  29Comments

nbingham1 picture nbingham1  ·  19Comments

PayasR picture PayasR  ·  10Comments

flyingzumwalt picture flyingzumwalt  ·  28Comments