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
Deadlocks in player.c #574
Labels
Comments
Closed
Closed
flyingmutant
added a commit
that referenced
this issue
Dec 8, 2017
Revert "Fix #574 (deadlocks in player.c)"
Reopening because of #754 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a serious problem with deadlocks in player.c. When the player asks the UI thread for the next track, it will block until the UI thread responds and continues to hold one of the player locks while it waits. If the UI thread at the same time tries to acquire one of the player locks for some reason (e.g. to change the track manually) we have a deadlock.
I've discovered this while debugging another problem that caused
cmus_get_next
to be called in rapid succession. Luckily this doesn't seem to happen that often normally.Right now I see two ways to fix this:
cmus_get_next
async: This is hard because the player code is very complicated and uses a completely synchronous design.cmus_get_next
: This is easier but still quite complicated. It is unclear which invariants could be violated if we temporarily release the lock.The text was updated successfully, but these errors were encountered: