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

Panic when doing 'ipfs cat' #2220

Closed
chriscool opened this issue Jan 21, 2016 · 1 comment
Closed

Panic when doing 'ipfs cat' #2220

chriscool opened this issue Jan 21, 2016 · 1 comment

Comments

@chriscool
Copy link
Contributor

This comes from this Circle CI run:

https://circleci.com/gh/ipfs/go-ipfs/2632

for PR #2208.

The error is:

expecting success: 
        ipfs cat "$PCOUT/$name" >tpcp_out &&
        ipfs cat "$target" >tpcp_exp &&
        test_cmp tpcp_exp tpcp_out

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x5b4fbe]

goroutine 1 [running]:
github.com/ipfs/go-ipfs/repo/fsrepo.(*FSRepo).GetStorageUsage.func1(0xc8200bc7e0, 0x5d, 0x0, 0x0, 0x2b019bdc4270, 0xc82068c0c0, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/repo/fsrepo/fsrepo.go:565 +0x3e
path/filepath.walk(0xc8200bc1e0, 0x52, 0x2b019c202890, 0xc8200b42d0, 0xc8201797c0, 0x0, 0x0)
    /usr/local/go/src/path/filepath/path.go:370 +0x415
path/filepath.walk(0xc8200101ea, 0x48, 0x2b019c202890, 0xc820016af0, 0xc8201797c0, 0x0, 0x0)
    /usr/local/go/src/path/filepath/path.go:374 +0x4fc
path/filepath.Walk(0xc8200101ea, 0x48, 0xc8201797c0, 0x0, 0x0)
    /usr/local/go/src/path/filepath/path.go:396 +0xe1
github.com/ipfs/go-ipfs/repo/fsrepo.(*FSRepo).GetStorageUsage(0xc820018940, 0x2, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/repo/fsrepo/fsrepo.go:567 +0xa7
github.com/ipfs/go-ipfs/repo.(*ref).GetStorageUsage(0xc8200e4780, 0x411358, 0x0, 0x0)
    <autogenerated>:22 +0x5c
github.com/ipfs/go-ipfs/core/corerepo.(*GC).maybeGC(0xc8206e4580, 0x2b019bdc4998, 0xc820018900, 0xc, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/core/corerepo/gc.go:162 +0x65
github.com/ipfs/go-ipfs/core/corerepo.ConditionalGC(0x2b019bdc4998, 0xc820018900, 0xc820116000, 0xc, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/core/corerepo/gc.go:158 +0x86
github.com/ipfs/go-ipfs/core/commands.glob.func18(0x2b019bdc48c0, 0xc820298240, 0x2b019bdc4a28, 0xc820014150)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/core/commands/cat.go:48 +0x2a8
github.com/ipfs/go-ipfs/commands.(*Command).Call(0x1429e40, 0x2b019bdc48c0, 0xc820298240, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/commands/command.go:110 +0x471
main.callCommand(0x2b019bdc4998, 0xc820018840, 0x2b019bdc48c0, 0xc820298240, 0x1429e40, 0x1418e80, 0x0, 0x0, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:343 +0xa5c
main.(*cmdInvocation).Run(0xc820018800, 0x2b019bdc4998, 0xc820018840, 0x0, 0x0, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:186 +0x1e5
main.main()
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/cmd/ipfs/main.go:151 +0x65b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 18 [chan receive]:
github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics.init.1.func2()
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics/metrics.go:321 +0x73
created by github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics.init.1
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/codahale/metrics/metrics.go:328 +0x7b

goroutine 19 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 20 [select]:
github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log.(*MirrorWriter).logRoutine(0xc8200ee580)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log/writer.go:71 +0x33c
created by github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log.NewMirrorWriter
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log/writer.go:38 +0xe2

goroutine 8 [select, locked to thread]:
runtime.gopark(0x1088c00, 0xc82002c728, 0xecb298, 0x6, 0x43cd18, 0x2)
    /usr/local/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc82002c728, 0x0, 0x18)
    /usr/local/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc82002c728)
    /usr/local/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
    /usr/local/go/src/runtime/signal1_unix.go:227 +0x353
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 29 [runnable]:
github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess.(*process).doClose.func1(0x0, 0x0, 0x0)
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go:208
created by github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess.(*process).doClose
    /home/ubuntu/.go_project/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go:221 +0x309
not ok 50 - output looks good
@whyrusleeping
Copy link
Member

This has been fixed, it was a bug in the walk function for the datastore enumeration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants