-
Notifications
You must be signed in to change notification settings - Fork 131
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
Deadlock on exception when opening connection #90
Comments
Hi @arnauorriols, can you add a code example that reproduces this error (so we can fix it)? |
I think I'm having the same issue. Steps to reproduce:
This crashes internally (traceback visible on stdout) but never returns, looking like the mentioned deadlocked. |
I've opened #97 proposing a fix. |
…ion; avoid deadlock after race condition where command is enqueued before thread can signal an exception piskvorky#90
@arnauorriols realized that #97 has a race condition. #107 is my fresh approach that solves the undetected failure to open the connection (on first command exection) which currently leads to a deadlock in the calling code. It also avoids the race condition when the thread's |
When SqliteDict is initialized, a connection to SQLite is opened (in here). This connection might fail.
If an exception happens, the connection does not get opened. However, the initialization still tries to create the table. In the commit of that operation, the execution is deadlocked, because the code keeps waiting infinitely in the req Queue.
The text was updated successfully, but these errors were encountered: