Skip to content

'ipfs add' stack trace while daemon is running #3075

@louisbourque

Description

@louisbourque

Version/Platform/Processor information:

$ ipfs version --all
go-ipfs version: 0.4.3-rc2-
Repo version: 4
System version: arm/linux
Golang version: go1.6.2

$ uname -a
Linux ipfs 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux

Type: bug
Area: commands
Priority: P1

Description:

If I try to run ipfs add file while ipfs daemon is running, I get a stack trace. If I stop the daemon, and try again it works fine. 'file' is just a text file in the current directory.

While ipfs daemon is running:

$ ipfs add file
goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
    /home/whyrusleeping/go/src/runtime/debug/stack.go:24 +0x84
runtime/debug.PrintStack()
    /home/whyrusleeping/go/src/runtime/debug/stack.go:16 +0x14
gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util.ErrCast(0x0, 0x0)
    /builds/distributions/dists/go-ipfs/gopath/src/gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util/util.go:34 +0x20
github.com/ipfs/go-ipfs/core/commands.glob.func7(0x76eb4130, 0x112a00c0, 0x76ef9550, 0x11062480)
    /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/core/commands/add.go:223 +0x9c
main.callCommand(0x76eb4230, 0x110f6e40, 0x76eb4130, 0x112a00c0, 0xe9f888, 0xe85830, 0x0, 0x0, 0x0, 0x0)
    /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:351 +0x6e0
main.(*cmdInvocation).Run(0x110f6b80, 0x76eb4230, 0x110f6e40, 0x0, 0x0, 0x0, 0x0)
    /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:189 +0x1a0
main.main()
    /builds/distributions/dists/go-ipfs/gopath/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:154 +0x65c
Error: cast error

While ipfs daemon is stopped:

$ sudo killall ipfs
$ ipfs add file
added QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions