Fix possible endless loop while polling curl socket#5589
Fix possible endless loop while polling curl socket#5589ahsonkhan merged 1 commit intoAzure:mainfrom
Conversation
|
Thank you for your contribution @CurtizJ! We will review the pull request and get back to you soon. |
LarryOsterman
left a comment
There was a problem hiding this comment.
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. |
ahsonkhan
left a comment
There was a problem hiding this comment.
@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
nowwill never be updated and it can lead to exceeding of timeout or endless loop if socket will never be ready. For instance in ClickHouse signalsSIGUSR1andSIGUSR2are 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.