Repository navigation
Conversation
|
Analysis of PR #23526 at ae95b7f4: Test 1694 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 144 different CI jobs (the link just goes to one of them). Generated by Testclutch |
icing
approved these changes
Oct 21, 2026
vszakats
reviewed
Oct 21, 2026
| global_init(CURL_GLOBAL_ALL); | ||
|
|
||
| multi_init(multi); | ||
| multi_setopt(multi, CURLMOPT_TIMERFUNCTION, t1694_timer); |
Member
There was a problem hiding this comment.
Is there a reaons these tests cannot be included in e.g. unit3230?
Contributor
Author
There was a problem hiding this comment.
No reason, thanks: I moved the checks into unit 3230 (a timer callback that fails during curl_multi_add_handle(), then CURLMINFO_XFERS_RUNNING and CURLMINFO_XFERS_CURRENT must both be 0) and removed lib1694/test1694. unit3230 fails without the lib/multi.c change and passes with it.
When the timer callback failed in curl_multi_add_handle(), the handle was removed from the transfer table, but it stayed counted in xfers_alive and in the process and dirty sets. The running handles count reported by curl_multi_perform() then never reached zero, so an application loop waiting for it never ended, even after removing all the handles that were actually added. Extend unit test 3230 to check the transfer counts after a failed add.
Marti2203
force-pushed
the
multi-add-timer-error
branch
from
October 21, 2026 13:50
6422ca6 to
67ebec2
Compare
Member
|
Thanks! |
dkarpov1970
pushed a commit
to dkarpov1970/curl
that referenced
this pull request
Nov 18, 2026
When the timer callback failed in curl_multi_add_handle(), the handle was removed from the transfer table, but it stayed counted in xfers_alive and in the process and dirty sets. The running handles count reported by curl_multi_perform() then never reached zero, so an application loop waiting for it never ended, even after removing all the handles that were actually added. Extend unit test 3230 to check the transfer counts after a failed add. Closes curl#23526 Backport notes: - Dropped the unit3230.c extension (not in the release). (cherry picked from commit 191dc2a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the
CURLMOPT_TIMERFUNCTIONcallback fails duringcurl_multi_add_handle(), the handle is removed from the transfer table again, but it stays counted inxfers_alive(and in the process and dirty sets). The running count fromcurl_multi_perform()then never gets back to 0, so awhile(running)loop never ends, even after the handles that were actually added are done and removed.This undoes those additions on that error path.
Unit test 3230 now also makes the timer callback fail during
curl_multi_add_handle()and then checks thatCURLMINFO_XFERS_RUNNINGandCURLMINFO_XFERS_CURRENTare both 0. Without the change, the failed handle still counts as running.This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually.