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

Concurrent access can cause deadlock #44

Open
willscott opened this issue Apr 24, 2020 · 0 comments
Open

Concurrent access can cause deadlock #44

willscott opened this issue Apr 24, 2020 · 0 comments

Comments

@willscott
Copy link
Contributor

Observed hang during fuzz testing

program hanged (timeout 10 seconds)

SIGABRT: abort
PC=0x462f01 m=0 sigcode=0

goroutine 0 [idle]:
runtime.futex(0x79b768, 0x80, 0x0, 0x0, 0x7ffd00000000, 0x462b25, 0xbb93a, 0x21d6076d, 0x7ffd8175da28, 0x40b37f, ...)
	runtime/sys_linux_amd64.s:567 +0x21
runtime.futexsleep(0x79b768, 0x0, 0xffffffffffffffff)
	runtime/os_linux.go:45 +0x46
runtime.notesleep(0x79b768)
	runtime/lock_futex.go:151 +0x9f
runtime.stopm()
	runtime/proc.go:1828 +0xc0
runtime.findrunnable(0xc000022000, 0x0)
	runtime/proc.go:2360 +0xa0d
runtime.schedule()
	runtime/proc.go:2520 +0x2fc
runtime.park_m(0xc000001200)
	runtime/proc.go:2690 +0x9d
runtime.mcall(0x0)
	runtime/asm_amd64.s:318 +0x5b

goroutine 1 [chan send]:
github.com/ipfs/go-datastore/fuzz.(*RunState).Fuzz(0xc00005e000, 0x7f1b500e8000, 0xe1, 0xe1)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:162 +0x68
github.com/ipfs/go-datastore/fuzz.FuzzDB(0x61df53, 0xd, 0xc00001c120, 0x13, 0xc00001c101, 0x7f1b500e8000, 0xe1, 0xe1, 0x2cd8fea415bd5245)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:142 +0x10e
github.com/ipfs/go-datastore/fuzz.Fuzz(0x7f1b500e8000, 0xe1, 0xe1, 0x4)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:128 +0x334
go-fuzz-dep.Main(0xc000044f70, 0x1, 0x1)
	go-fuzz-dep/main.go:36 +0x1ad
main.main()
	github.com/ipfs/go-datastore/fuzz/go.fuzz.main/main.go:15 +0x52

goroutine 3 [select]:
github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).drain(0xc00006a000)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/util/buffer_pool.go:206 +0x1b1
created by github.com/syndtr/goleveldb/leveldb/util.NewBufferPool
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/util/buffer_pool.go:237 +0x212

goroutine 5 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc0000bc820)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_compaction.go:90 +0x117
created by github.com/syndtr/goleveldb/leveldb.openDB
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:142 +0x4f2

goroutine 6 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc0000bc820)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_state.go:101 +0x108
created by github.com/syndtr/goleveldb/leveldb.openDB
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:143 +0x514

goroutine 7 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0xc0000bc820)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_compaction.go:825 +0x2ba
created by github.com/syndtr/goleveldb/leveldb.openDB
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:149 +0x6b0

goroutine 8 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc0000bc820)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_compaction.go:762 +0x1a0
created by github.com/syndtr/goleveldb/leveldb.openDB
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:150 +0x6d2

goroutine 9 [semacquire]:
sync.runtime_Semacquire(0xc00005e030)
	runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc00005e028)
	sync/waitgroup.go:130 +0x64
github.com/ipfs/go-datastore/fuzz.Open.func2(0xc00005e000, 0xc00000e001, 0xc00001c120, 0x13, 0xc0000965a0)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:96 +0x4b
created by github.com/ipfs/go-datastore/fuzz.Open
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:95 +0x2dd

goroutine 10 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).putRec(0xc0000bc820, 0x0, 0xc000016620, 0x1, 0x8, 0x0, 0x0, 0x0, 0xc000016628, 0x1, ...)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_write.go:330 +0x3f7
github.com/syndtr/goleveldb/leveldb.(*DB).Delete(0xc0000bc820, 0xc000016620, 0x1, 0x8, 0xc000016628, 0x8, 0x2d)
	/home/user/Documents/local/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_write.go:381 +0x8f
github.com/ipfs/go-ds-leveldb.(*accessor).Delete(0xc00000e0a0, 0x61c362, 0x1, 0x0, 0x0)
	/home/user/Documents/local/go/pkg/mod/github.com/ipfs/[email protected]/datastore.go:118 +0x13a
github.com/ipfs/go-datastore/fuzz.nextState(0xc00003ef30, 0xc00003ee82, 0x0, 0x0)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:265 +0x66f
github.com/ipfs/go-datastore/fuzz.threadDriver(0x6591e0, 0xc000090040, 0xc00005e000, 0xc0000fe000)
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:208 +0x173
created by github.com/ipfs/go-datastore/fuzz.Open
	/home/user/Documents/github/go-datastore/fuzz/fuzzer.go:107 +0x3dd
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

1 participant