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

Badger still crashing on shutdown after latest fixes #6986

Closed
ribasushi opened this issue Mar 11, 2020 · 2 comments · Fixed by #7114
Closed

Badger still crashing on shutdown after latest fixes #6986

ribasushi opened this issue Mar 11, 2020 · 2 comments · Fixed by #7114
Labels
kind/bug A bug in existing code (including security flaws)
Milestone

Comments

@ribasushi
Copy link
Contributor

ribasushi commented Mar 11, 2020

Version information:

Local build off 6ae79efc2f86

go-ipfs version: 0.5.0-dev
Repo version: 7
System version: amd64/darwin
Golang version: go1.14

Description:

Badger crashes on shutdown despite the latest merged fixes ( this issues is separate from #6985 ). @Stebalien I actually can not find a badger-related merge in master's history... nevermind, apparently this was fixed ages ago, which is why I couldn't find it.

... | go run ./cmd/ipfs --encoding=json add --progress=false --chunker=rabin --trickle=false --raw-leaves=true --cid-version=1 
added bafybeicms4x7k62edxnnyysfufsotnivbfjoj6a7aouujcgg4l2kasnsey bafybeicms4x7k62edxnnyysfufsotnivbfjoj6a7aouujcgg4l2kasnsey
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x4abe3b1]

goroutine 65 [running]:
github.com/dgraph-io/badger/skl.(*Skiplist).IncrRef(...)
	/Users/admin/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/skl/skl.go:86
github.com/dgraph-io/badger.(*DB).getMemTables(0xc0000c2000, 0x0, 0x0, 0x0, 0x0)
	/Users/admin/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:481 +0xd1
github.com/dgraph-io/badger.(*Txn).NewIterator(0xc0000b2380, 0x1, 0x64, 0x0, 0xc00052c360, 0x13, 0x20, 0x0, 0x0)
	/Users/admin/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/iterator.go:407 +0x89
github.com/ipfs/go-ds-badger.(*txn).query(0xc00000e680, 0xc00019b760, 0x12, 0x0, 0x0, 0x0, 0xc0005105b0, 0x1, 0x1, 0x1, ...)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ds-badger@v0.2.1/datastore.go:601 +0x1f1
github.com/ipfs/go-ds-badger.(*Datastore).Query(0xc0000a73e0, 0xc00019b760, 0x12, 0x0, 0x0, 0x0, 0xc0005105b0, 0x1, 0x1, 0x1, ...)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ds-badger@v0.2.1/datastore.go:329 +0x12a
github.com/ipfs/go-ds-measure.(*measure).Query(0xc0000ec000, 0xc00019b760, 0x12, 0x0, 0x0, 0x0, 0xc0005105b0, 0x1, 0x1, 0x1, ...)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ds-measure@v0.1.0/measure.go:246 +0x12b
github.com/ipfs/go-ds-measure.(*measure).Query(0xc0000ec300, 0xc00019b760, 0x12, 0x0, 0x0, 0x0, 0xc0005105b0, 0x1, 0x1, 0x1, ...)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ds-measure@v0.1.0/measure.go:246 +0x12b
github.com/ipfs/go-datastore/keytransform.(*Datastore).Query(0xc0003a81e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0005105b0, 0x1, 0x1, 0x1, ...)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-datastore@v0.4.4/keytransform/keytransform.go:71 +0x1d5
github.com/ipfs/go-ipfs-provider/queue.(*Queue).getQueueHead(0xc000398ff0, 0x0, 0x0, 0x0)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ipfs-provider@v0.3.0/queue/queue.go:137 +0x124
github.com/ipfs/go-ipfs-provider/queue.(*Queue).work.func1(0xc000398ff0)
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ipfs-provider@v0.3.0/queue/queue.go:83 +0x782
created by github.com/ipfs/go-ipfs-provider/queue.(*Queue).work
	/Users/admin/go/pkg/mod/github.com/ipfs/go-ipfs-provider@v0.3.0/queue/queue.go:73 +0x3f
exit status 2
@ribasushi ribasushi added the kind/bug A bug in existing code (including security flaws) label Mar 11, 2020
@hsanjuan
Copy link
Contributor

hsanjuan commented Apr 1, 2020

Is #7015 the fix-approach for this? Still happening on master (when adding offline).

@Stebalien
Copy link
Member

Damn. I thought I fixed it.

@Stebalien Stebalien mentioned this issue Apr 8, 2020
71 tasks
@Stebalien Stebalien added this to the go-ipfs 0.5 milestone Apr 8, 2020
Stebalien added a commit to ipfs/go-ds-badger that referenced this issue Apr 8, 2020
fixes part of ipfs/kubo#6986

(the other part is that we should be shutting down in the right order)
Stebalien added a commit that referenced this issue Apr 8, 2020
Stebalien added a commit to ipfs/go-ds-badger2 that referenced this issue Apr 16, 2020
fixes part of ipfs/kubo#6986

(the other part is that we should be shutting down in the right order)
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 6, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 6, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
hannahhoward pushed a commit to filecoin-project/kubo-api-client that referenced this issue Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants