Skip to content

nil pointer panic on killing daemon #974

@whyrusleeping

Description

@whyrusleeping

Was working on finding a bug related to adding directories with bad symlinks, and got this when trying to kill my daemon.

whyrusleeping@idril ~ [255]> ipfs daemon
Initializing daemon...
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
^CReceived interrupt signal, shutting down...
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x48 pc=0x8bf050]

goroutine 7355 [running]:
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb.(*memDB).decref(0xc20a03c820)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_state.go:30 +0x70
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb.func·022()
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go:31 +0x2e
sync.(*Once).Do(0xc209da9ca0, 0xc209325c40)
    /home/whyrusleeping/go/src/sync/once.go:44 +0xd4
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb.(*memdbReleaser).Release(0xc209da9ca0)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go:32 +0x4f
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util.(*BasicReleaser).Release(0xc2088f6c00)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/util/util.go:53 +0x49
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb.(*dbIter).Release(0xc2088f6c00)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go:168 +0x85
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator.(*mergedIterator).Release(0xc2088f6c80)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go:258 +0x9d
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb.(*dbIter).Release(0xc20abac360)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/db_iter.go:313 +0x10d
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb.(*datastore).runQuery(0xc20804e050, 0x7f98be05e500, 0xc208751f80, 0xc208751ea0)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb/datastore.go:146 +0x2a4
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb.func·001(0x7f98be05e500, 0xc208751f80)
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/leveldb/datastore.go:86 +0x4a
github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess.func·005()
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go:102 +0x70
created by github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess.(*process).Go
    /home/whyrusleeping/gopkg/src/github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go:105 +0x3f3

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)topic/commandsTopic commands

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions