-
Notifications
You must be signed in to change notification settings - Fork 129
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 possible endless loop while polling curl socket #5589
Conversation
Thank you for your contribution @CurtizJ! We will review the pull request and get back to you soon. |
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.
Oops. Extremely good catch.
Is it possible to write a test for this?
Yes, I'll try to add a test. |
That's a great catch! I am curious, how did you discover this? Did you actually hit the endless loop, in your use case? |
We use this sdk for integration with azure blob storage in ClickHouse. I ran a stress test with heavy queries and after finishing it I noticed some hung queries with stacktrace on the line changed in this PR. I don't know why |
Sorry for the delay, it appeared to be harder to add test than I thought. |
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.
@LarryOsterman given this is a great reliability bug fix, I propose we merge it.
I'll make a changelog update PR, for core, attributing @CurtizJ for fixing this issue. Thanks!
## 1.13.0 (2024-07-12) ### Bugs Fixed - [[microsoft#5589]](Azure/azure-sdk-for-cpp#5589) Fix possible endless loop while polling curl socket. (A community contribution, courtesy of _[CurtizJ](https://github.com/CurtizJ)_) ### Other Changes - Updated JSON library to 3.11.3. - [[microsoft#5622]](Azure/azure-sdk-for-cpp#5622) Documentation fix for building the SDK with specific OpenSSL version. (A community contribution, courtesy of _[ByteYue](https://github.com/ByteYue)_) ### Acknowledgments Thank you to our developer community members who helped to make Azure Core better with their contributions to this release: - Anton Popov _([GitHub](https://github.com/CurtizJ))_ - AlexYue _([GitHub](https://github.com/ByteYue))_
In case of high frequency of received signals (more than once per second) the field
now
will never be updated and it can lead to exceeding of timeout or endless loop if socket will never be ready. For instance in ClickHouse signalsSIGUSR1
andSIGUSR2
are being sent each second by internal query profiler and we faced this issue.Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.