-
-
Notifications
You must be signed in to change notification settings - Fork 785
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
Fix: noackmode zombie state handling #2060
Fix: noackmode zombie state handling #2060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, there's just a couple of (mostly code style) things to sort and we'll get this merged. Seen it demonstrated working so that's all fine.
567bc23
to
4d81e01
Compare
When a connection is terminated abruptly the noackmode state may be left in a "zombie" state, enabled, because we are unable to detect the connection was terminated. We previously used the qSupported packet to signal a new connection and reset the state, but this breaks compatibility with LLDb which does not send qSupported as the first packet. This attempts a new approach, by checking if a acknowledgement was sent in response to qSupported reply, we can detect when noackmode is enabled when it shouldn't. This also needs some special cases to acknowledge the first packets in a connection when noackmode is in a zombie state.
4d81e01
to
f4e79b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all LGTM, going to give it a quick spin locally and then once convinced it's all working as intended, we'll merge it. Thank you for the contribution!
Detailed description
When a connection is terminated abruptly the noackmode state may be left in a "zombie" state, enabled, because we are unable to detect the connection was terminated.
We previously used the qSupported packet to signal a new connection and reset the state, but this breaks compatibility with LLDB which does not send qSupported as the first packet.
This attempts a new approach, by checking if a acknowledgement was sent in response to qSupported reply, we can detect when noackmode is enabled when it shouldn't. This also needs some special cases to acknowledge the first packets in a connection when noackmode is in a zombie state.
This introduces a small issue on LLDB connections, it tries to get an acknowledgement on qSupported which never comes, this is intended but, at least in hosted, the timeout is apparently not respected resulting in a slowdown of the connection of around ~1 second. This is an unrelated bug, and the connection is still successful in the end so I deem it out of scope of this PR to fix it.
Debug logs for connections after the changes
GDB, normal operation / clean state:
GDB, NoAckMode zombie state:
LLDB, normal operation / clean state:
LLDB, NoAckMode zombie state:
Your checklist for this pull request
Closing issues