-
Notifications
You must be signed in to change notification settings - Fork 19
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
RTC-15334: Fix crash caused by a race condition #397
base: master
Are you sure you want to change the base?
Conversation
} | ||
else | ||
|
||
if (endpoint.getTransportType() != ice::TransportType::UDP) |
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.
I believe this was another bug. If we received something that was not properly authenticated on UdpEndpoint, we would close UdpEndpoint which is shared port 10000
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.
LGTM
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.
Nice catch. I guess this contention on hmac computer becomes more severe with use of ipv6 and higher traffic.
Most of the time a client will not probe at all before call and if it does, it fires at udp ipv4 before it does tcp v4, if at all. Even if multiple clients probe simultaneously they are serialized over the udp endpoint recvjobqueue. But with ipv6 udp there are two parallell paths.
I believe this fix the crash we have seen on compute hmac.
The crash happens to a race condition. STUN packets that are addressed to ProbeServer are being processed on Endpoint jobQueue. If multiple STUN packets arrives in different endpoint (udp ipv4, udp ipv6, tcp ipv4, tcp ipv6) the race can happen on
_hmacComputer
.To fix that, ProbeServer now has it's own jobQueue