Ipfs: ./ipfs diag cmds 恐慌

创建于 2016-05-24  ·  4评论  ·  资料来源: ipfs/ipfs

我正在运行 IPFS 0.4.2。 安装后,我立即运行./ipfs diag cmds ,它惊慌失措:

me<strong i="7">@there</strong>:~/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

我想我(从概念上)理解为什么会发生这种情况; 此节点上没有运行任何命令(它是全新的),因此没有任何可打印的内容。 尽管如此,恐慌似乎是不合适的。

kinbug

所有4条评论

感谢您遇到这个问题 :) 在第一个 API 请求发出后它是否仍然恐慌? 例如到http://localhost :5001/api/v0/version。

昨天晚上可能不是开始制造问题的好时机。 首先,我看到我在错误的 repo 中发布了帖子,我确定我检查过……其次,当我发出./ipfs diag cmds时,我没有运行守护程序。 当我今天早上 _did_ 运行守护程序时,我得到:

me<strong i="7">@there</strong>:~/go-ipfs$ ./ipfs diag cmds
Command    Active  StartTime        RunTime
diag/cmds  true    May 25 08:55:46  696.373µs

我仍然认为它不应该恐慌,但这使它更容易解释。

我应该关闭这个问题并在正确的 repo 中打开一个新问题吗?

@haarts听起来不错! 前进。

此页面是否有帮助?
0 / 5 - 0 等级