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

Set fSocket to -1 after close on an error to prevent a double close. #480

Merged
merged 1 commit into from Jun 19, 2019

Conversation

yasij
Copy link
Contributor

@yasij yasij commented Jun 19, 2019

Since alsa-plugins >= 1.1.7 now enables the ALSA jack plugin by default with 50-jack.conf, I've been seeing sporadic crashes in Kodi when the sound devices get reenumerated for a udev event. I traced this down to a double close on the audio engine thread concurrent with a close on the udev thread which asserts on EBADF in libudev causing the crash.
An strace pointed to the double close occuring in posix/JackSocket.cpp:139 and posix/JackSocket.cpp:158.
To fix this, reset fSocket to -1 after closing on an error to prevent a double close later.
Signed-off-by: Joe Yasi joe.yasi@gmail.com

Signed-off-by: Joe Yasi <joe.yasi@gmail.com>
@falkTX
Copy link
Member

falkTX commented Jun 19, 2019

Makes sense, thank you.

@falkTX falkTX merged commit dad4b57 into jackaudio:develop Jun 19, 2019
@yasij
Copy link
Contributor Author

yasij commented Jul 5, 2019 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants