-
Notifications
You must be signed in to change notification settings - Fork 575
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
Don't send an ACK to a 500 until *after* the callbacks #3255
Conversation
Any updates here? No progress has been made in the last 30 days, marking as stale. |
No updates here. |
Any updates here? No progress has been made in the last 30 days, marking as stale. |
No updates here. |
Hi @jes , there is a very important comment, just on top of the code you moved:
The idea here is to be able to send back the ACK (as confirmation for the negative reply) and stop any potential retransmission from the callee side - any extra processing here (like reply related callbacks) may delay the sending of the ACK and increase the chances of useless negative reply retransmissions. Still, I agree with you on the bogus tracing behavior (like tracing first the ACK and then the reply) - it is a know issue and there is an outstanding bug report on that. Nevertheless, we do not have a solution here to make everybody happy :) |
Commit aaa6b68 mitigated the effects of a poor HEP connection affecting the OpenSIPS's responsiveness by delaying the reply callbacks until after the hop-by-hop ACK is sent out. However, a side-effect in doing so is that the reply/ACK HEP packets on un-established calls became swapped. This patch aims to address the issue. Related to #3255
Some additional context: the issue with the swapped "negative-reply" and ACK HEP packets is a side-effect of commit aaa6b68 which, as @bogdan-iancu mentioned, improves the SIP server's responsiveness and helps reduce UDP retransmission traffic. The issue is easily reproducible, which is helpful. And as a solution to make both ends meet (fix the HEP without compromising on performance), I pushed a patch to If you could give some feedback on the patch as well before we backport it, @jes, that would be great! Thanks in advance! |
Commit aaa6b68 mitigated the effects of a poor HEP connection affecting the OpenSIPS's responsiveness by delaying the reply callbacks until after the hop-by-hop ACK is sent out. However, a side-effect in doing so is that the reply/ACK HEP packets on un-established calls became swapped. This patch aims to address the issue. Related to #3255 (cherry picked from commit 43477da)
Enough time has passed here for testing the fix on |
Thanks! |
Summary
We had an issue where HEP traces would show the ACK to a 500 being sent out before the 500 was received.
Details
This is confusing because it makes it look like OpenSIPS is preemptively ACK'ing a 500 it hasn't yet received.
Solution
This PR delays the sending of the ACK until after the callbacks for the 500 have run, which allows the HEP for the 500 response to be transmitted before the ACK and its HEP are transmitted.
Compatibility
I don't imagine this breaks any other scenarios, but it is conceivable that it does. I don't know enough.
Closing issues