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

Noticed Deadlock? Sometimes buntdb gets stuck by a deadlock #74

Open
ibudisteanu opened this issue May 25, 2021 · 3 comments
Open

Noticed Deadlock? Sometimes buntdb gets stuck by a deadlock #74

ibudisteanu opened this issue May 25, 2021 · 3 comments

Comments

@ibudisteanu
Copy link

ibudisteanu commented May 25, 2021

Hi. Today, I decided to integrate buntdb via interfaces ( alongside boltdb ) as both libraries are very similar. When running the same code using buntdb, sometimes it generates a deadlock and gets stuck (probably the locking mechanism of buntdb). I want to say that I am running the same exact code using boltdb and I never noticed any deadlock using boltdb.

You can check both databases integrations via an interface https://github.com/PandoraPay/go-pandora-pay/tree/main/store/store-db

LE: Could it be because the string -> []byte cast? As keys and values are binary data casted as strings?
LE2: Tested it again. Buntdb generates deadlock. Same code running with boltdb no deadlock spotted.

@tidwall
Copy link
Owner

tidwall commented Jun 1, 2021

Hi. I would like to reproduce this issue. Could you provide the steps to cause the deadlock?

@ibudisteanu
Copy link
Author

Hi @tidwall ! Thanks for the response. I will make you a tutorial tomorrow to reproduce it after I will test it again. Thanks again!

@gohumble
Copy link

gohumble commented Jun 4, 2021

Today, I also noticed a deadlock.
I was starting a read / write transaction (update) enclosed within a read-only transaction (view). Silly me running untested code.

Stumbled across this issue and thought this info might be interesting for other users.
Cheers!

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