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

LevelDB panic #29

Open
Stebalien opened this issue Mar 28, 2019 · 3 comments
Open

LevelDB panic #29

Stebalien opened this issue Mar 28, 2019 · 3 comments

Comments

@Stebalien
Copy link
Member

This may be some kind of concurrent open/close/get bug. That is, we tend to quickly open and then close the datastore when running our tests so this could be an issue triggered by trying to "get" something while closing (we ran into that with badger).

github.com/syndtr/goleveldb/leveldb.(*tOps).find(0xc00048c1e0, 0xc00043c190, 0xc000170280, 0x1c, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/table.go:383 +0x221
github.com/syndtr/goleveldb/leveldb.(*version).get.func1(0x1, 0xc00043c190, 0x14)
	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/version.go:176 +0x452
github.com/syndtr/goleveldb/leveldb.(*version).walkOverlapping(0xc00043c1e0, 0x0, 0x0, 0x0, 0xc000170280, 0x1c, 0x1c, 0xc0001db910, 0xc0001db8e0)

	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/version.go:125 +0x477
github.com/syndtr/goleveldb/leveldb.(*version).get(0xc00043c1e0, 0x0, 0x0, 0x0, 0xc000170280, 0x1c, 0x1c, 0x0, 0x0, 0x0, ...)
	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/version.go:160 +0x2b2
github.com/syndtr/goleveldb/leveldb.(*DB).get(0xc00029e1a0, 0x0, 0x0, 0x0, 0x0, 0xc000170260, 0x14, 0x20, 0x141, 0x0, ...)
	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:779 +0x397
github.com/syndtr/goleveldb/leveldb.(*DB).Get(0xc00029e1a0, 0xc000170260, 0x14, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/circleci/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:845 +0x12f
github.com/ipfs/go-ds-leveldb.(*accessor).Get(0xc00016a7b0, 0xc000170240, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/circleci/go/pkg/mod/github.com/ipfs/[email protected]/datastore.go:84 +0x82
github.com/ipfs/go-ds-measure.(*measure).Get(0xc00010a480, 0xc000170240, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/circleci/go/pkg/mod/github.com/ipfs/[email protected]/measure.go:149 +0xd4
github.com/ipfs/go-datastore/mount.(*Datastore).Get(0xc00000c400, 0xc000170080, 0x14, 0x24b0b20, 0xbf1f03a0296a5f36, 0x276c833, 0x2491a20, 0x14)
	/home/circleci/go/pkg/mod/github.com/ipfs/[email protected]/mount/mount.go:97 +0x70
github.com/ipfs/go-ds-measure.(*measure).Get(0xc00010a6c0, 0xc000170080, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/circleci/go/pkg/mod/github.com/ipfs/[email protected]/measure.go:149 +0xd4
github.com/ipfs/go-datastore/keytransform.(*ktds).Get(0xc000244c00, 0xc000394090, 0x2, 0xd76a7c, 0x16af545, 0x1, 0xc000394090, 0x2)
	/home/circleci/go/pkg/mod/github.com/ipfs/[email protected]/keytransform/keytransform.go:40 +0x76
github.com/ipfs/go-ipfs/provider.(*Queue).nextEntry(0xc0003ace10, 0x0, 0x0, 0x1, 0x0)
	/home/circleci/ipfs/go-ipfs/provider/queue.go:73 +0xc2
github.com/ipfs/go-ipfs/provider.(*Queue).work.func1(0xc0003ace10)
	/home/circleci/ipfs/go-ipfs/provider/queue.go:107 +0x6d1
created by github.com/ipfs/go-ipfs/provider.(*Queue).work
	/home/circleci/ipfs/go-ipfs/provider/queue.go:101 +0x4f
@magik6k
Copy link
Member

magik6k commented Apr 9, 2019

Closing as ipfs/kubo#6186 was merged

@magik6k magik6k closed this as completed Apr 9, 2019
@Stebalien
Copy link
Member Author

Actually, I'm going to re-open this and move it to go-ds-leveldb. IMO, we should support concurrent get/close.

@Stebalien Stebalien reopened this Apr 9, 2019
@Stebalien Stebalien transferred this issue from ipfs/kubo Apr 9, 2019
@willscott
Copy link
Contributor

Appears to have resurfaced as ipfs/kubo#6880

willscott added a commit that referenced this issue Feb 20, 2020
Add a `sync.RWMutex` protecting the Close operation.
Follows the same pattern as in go-ds-badger.
Address #29 / ipfs/kubo#6880
willscott added a commit that referenced this issue Feb 25, 2020
Add a `sync.RWMutex` protecting the Close operation.
Follows the same pattern as in go-ds-badger.
Address #29 / ipfs/kubo#6880
willscott added a commit that referenced this issue Feb 25, 2020
Add a `sync.RWMutex` protecting the Close operation.
Follows the same pattern as in go-ds-badger.
Address #29 / ipfs/kubo#6880
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

3 participants