-
Notifications
You must be signed in to change notification settings - Fork 94
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
Database is deadlocking #298
Comments
@cbrake This behavior shouldn't happen, especially if you are only using read statements. I'll try to reproduce it. |
thanks @asdine The following program will deadlock after a few seconds of running: https://github.com/simpleiot/simpleiot/blob/feature-genji2/cmd/genji-test6/main.go Without the sleep statements, it deadlocks right away.
|
The memory engine deadlocks as well. However, I can't get badger engine to deadlock, even after removing the sleeps.
|
@cbrake thanks! I can reproduce the issue on single-core xhyve VM with GOMAXPROCS ≥ 2 with your Log
And when setting GOMAXPROCS=1 and removing Log
|
Seems to be caused by
|
See also https://play.golang.org/p/Fnfs2aUNey4 for a test case we may want to include in tests. |
Thanks for this! It's very helpful! |
@asdine actually, we don’t need a separate branch just for the v0.8.1 tag. This comment suggested a If you don’t have any objections, I’ll get this process documented and automated as part of the #269. |
v0.8.1 is working great with boltdb now -- thanks for the fix! |
@asdine just noticed that we forgot to add |
turns out I need the below fix as well, so just running with latest master for now -- guess I can do more testing for you that way :-) |
Hi, I've been experimenting with Genji v0.8.0 in one of my apps:
https://github.com/simpleiot/simpleiot/blob/feature-genji2/db/genji/genji.go
After I click around in the frontend a bit, API calls start timing out.
I instrumented the db calls, and learned that if one of the calls starts before the previous one finishes, the API calls start timing out soon after that.
Am I doing anything obviously wrong? I'm using boltdb backend and thought boltdb was thread safe. Do I need to wrap all db operations in transactions?
The text was updated successfully, but these errors were encountered: