-
Notifications
You must be signed in to change notification settings - Fork 892
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 if aeron::Aeron object destroyed too quickly #844
Comments
mjpt777
added a commit
that referenced
this issue
Feb 10, 2020
Can you check if this works for you now? |
Thanks for the quick patch. I think this may now crash if |
mjpt777
added a commit
that referenced
this issue
Feb 10, 2020
Just tested this and no more deadlock - thanks again. |
mjpt777
added a commit
that referenced
this issue
Feb 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I managed to get a deadlock by destroying an aeron::Aeron object too quickly after its construction. It happens if
m_isRunning = false
inAgentRunner::close
executes beforeatomic_compare_exchange_strong
inAgentRunner::run
(which setsAgentRunner::m_isRunning
back totrue
thus the spawned thread never exits).Should it be that
AgentRunner::run
checkswhile (!m_isClosed)
instead ofwhile (m_isRunning)
? I think that would fix it so that a close-request can't be "missed". Or can you see a better way to fix this? Thanks!The text was updated successfully, but these errors were encountered: