Skip to content

runtests: enable retries for threaded tests - #23552

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:test20-retry
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:test20-retry

Conversation

@vszakats

@vszakats vszakats commented Oct 22, 2026 •

Copy link
Copy Markdown
Member
  • runtests: make threads keyword retry also.
    It affects 3300, 3301, 3306.
  • test3300: drop explicit retry keyword in favor of the above.
  • test20: allow retries under valgrind.
    To stabilize test runs with AsynchDNS curl.

Follow-up to 8887d14 #23496


  • tackle test 3301.

Silencing:

test 0020 [attempt connect to non-existing hostname]
 valgrind ERROR ==12842== 152 bytes in 1 blocks are possibly lost in loss record 2 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x11365F: custom_calloc (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x48E5C23: thrdpool_signal (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49374FF: Curl_thrdq_send (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937667: async_thrdd_query (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937F0F: Curl_async_getaddrinfo.part.0 (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959193: hostip_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959A23: Curl_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959BE3: cf_dns_start (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495D5FF: cf_dns_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4952227: Curl_conn_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495BA43: multi_runsingle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495C80F: multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495CB5F: curl_multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x496D357: curl_easy_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x12E85F: operate (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==
==12842== 156 bytes in 1 blocks are definitely lost in loss record 3 of 5
==12842==    at 0x4885250: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x4A9922B: __libc_alloc_buffer_allocate (alloc_buffer_allocate.c:26)
==12842==    by 0x4B0B1CB: alloc_buffer_allocate (alloc_buffer.h:149)
==12842==    by 0x4B0B1CB: __resolv_conf_allocate (resolv_conf.c:394)
==12842==    by 0x4B06B83: __resolv_conf_load (res_init.c:599)
==12842==    by 0x4B0AE23: __resolv_conf_get_current (resolv_conf.c:143)
==12842==    by 0x4B073DB: __res_vinit (res_init.c:628)
==12842==    by 0x4B0BB5B: maybe_init (resolv_context.c:122)
==12842==    by 0x4B0BCEB: context_get (resolv_context.c:184)
==12842==    by 0x4B0BCEB: context_get (resolv_context.c:176)
==12842==    by 0x4B0BCEB: __resolv_context_get (resolv_context.c:195)
==12842==    by 0x4B19687: gethostbyname2_r@@GLIBC_2.17 (getXXbyYY_r.c:213)
==12842==    by 0x4B17EC7: try_simple_gethostbyname (getaddrinfo.c:985)
==12842==    by 0x4B17EC7: gaih_inet (getaddrinfo.c:1173)
==12842==    by 0x4B17EC7: getaddrinfo (getaddrinfo.c:2391)
==12842==    by 0x48E0C23: Curl_getaddrinfo_ex (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48E6E57: async_thrdd_item_process (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49372AF: thrdslot_run (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48D1703: curl_thread_create_thunk (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4A8582B: start_thread (pthread_create.c:447)
==12842==    by 0x4AEB8DB: thread_start (clone.S:79)
==12842==
==12842== 248 bytes in 1 blocks are possibly lost in loss record 4 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x11365F: custom_calloc (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x490853F: Curl_thrdpool_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49089B3: Curl_thrdq_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495DDCB: Curl_multi_handle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x496D3A7: curl_easy_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x12E85F: operate (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x1128DF: main (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==
==12842== 272 bytes in 1 blocks are possibly lost in loss record 5 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x400F553: calloc (rtld-malloc.h:44)
==12842==    by 0x400F553: allocate_dtv (dl-tls.c:370)
==12842==    by 0x400FF5F: _dl_allocate_tls (dl-tls.c:629)
==12842==    by 0x4A86257: allocate_stack (allocatestack.c:429)
==12842==    by 0x4A86257: pthread_create@@GLIBC_2.34 (pthread_create.c:655)
==12842==    by 0x48E1977: Curl_thread_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48E5BDF: thrdpool_signal (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49374FF: Curl_thrdq_send (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937667: async_thrdd_query (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937F0F: Curl_async_getaddrinfo.part.0 (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959193: hostip_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959A23: Curl_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959BE3: cf_dns_start (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495D5FF: cf_dns_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4952227: Curl_conn_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495BA43: multi_runsingle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495C80F: multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==
== Contents of files in the log/3/ directory after test 20
=== Start of file commands.log

Ref: https://github.com/curl/curl/actions/runs/39744870127/job/119710798715#step:45:181

@vszakats vszakats added tests name lookup DNS and related tech labels Oct 22, 2026
@vszakats

Copy link
Copy Markdown
Member Author

Azure Ubuntu mirror timeouts are back again, after a few days of hiatus.

@vszakats

Copy link
Copy Markdown
Member Author

/cc @icing Do you think this valgrind report is (in OP) worth looking into, or fine to just silence with retries?

@icing

icing commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

/cc @icing Do you think this valgrind report is (in OP) worth looking into, or fine to just silence with retries?

I am not sure what I am looking at here. Leaked (surely, possibly) memory reported by valgrind on a threaded getaddrinfo() call? With the "definitely lost" inside libc? hmm...

@vszakats

Copy link
Copy Markdown
Member Author

Caught another thread-related flaky fail, that's without valgrind/torture. Added a TODO to tage it accordingly.

-------em-- OK (1998 out of 2021, remaining: 00:01, took 0.204s, duration: 02:02)
test 3301 [thrdqueue unit tests]

units returned 9, when expecting 0
 3301: exit FAILED
== Contents of files in the log/11/ directory after test 3301
=== Start of file commands.log
 ./unit/units unit3301 - > log/11/stdout3301 2> log/11/stderr3301
=== End of file commands.log
=== Start of file server.cmd
 Testnum 3301
=== End of file server.cmd
=== Start of file stderr3301
 URL: -
 created item 0
 created item 1
 created item 2
 created item 3
 created item 4
 created item 5
 created item 6
 created item 7
 created item 8
 created item 9
 received item 0
 free item 0
 received item 1
 free item 1
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:120 Assertion '!result' FAILED: queue-b recv
 free item 2
 free item 3
 free item 9
 free item 8
 free item 7
 free item 6
 free item 5
 free item 4
 /Users/runner/work/curl/curl/tests/unit/unit3301.c:131 Assertion 'nrecvd == count' FAILED: queue-b unexpected done count
 Test ended with result 9
=== End of file stderr3301

https://github.com/curl/curl/actions/runs/39865647122/job/120127049412?pr=23573#step:16:4126

Silencing:
```
test 0020 [attempt connect to non-existing hostname]
 valgrind ERROR ==12842== 152 bytes in 1 blocks are possibly lost in loss record 2 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x11365F: custom_calloc (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x48E5C23: thrdpool_signal (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49374FF: Curl_thrdq_send (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937667: async_thrdd_query (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937F0F: Curl_async_getaddrinfo.part.0 (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959193: hostip_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959A23: Curl_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959BE3: cf_dns_start (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495D5FF: cf_dns_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4952227: Curl_conn_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495BA43: multi_runsingle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495C80F: multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495CB5F: curl_multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x496D357: curl_easy_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x12E85F: operate (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==
==12842== 156 bytes in 1 blocks are definitely lost in loss record 3 of 5
==12842==    at 0x4885250: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x4A9922B: __libc_alloc_buffer_allocate (alloc_buffer_allocate.c:26)
==12842==    by 0x4B0B1CB: alloc_buffer_allocate (alloc_buffer.h:149)
==12842==    by 0x4B0B1CB: __resolv_conf_allocate (resolv_conf.c:394)
==12842==    by 0x4B06B83: __resolv_conf_load (res_init.c:599)
==12842==    by 0x4B0AE23: __resolv_conf_get_current (resolv_conf.c:143)
==12842==    by 0x4B073DB: __res_vinit (res_init.c:628)
==12842==    by 0x4B0BB5B: maybe_init (resolv_context.c:122)
==12842==    by 0x4B0BCEB: context_get (resolv_context.c:184)
==12842==    by 0x4B0BCEB: context_get (resolv_context.c:176)
==12842==    by 0x4B0BCEB: __resolv_context_get (resolv_context.c:195)
==12842==    by 0x4B19687: gethostbyname2_r@@GLIBC_2.17 (getXXbyYY_r.c:213)
==12842==    by 0x4B17EC7: try_simple_gethostbyname (getaddrinfo.c:985)
==12842==    by 0x4B17EC7: gaih_inet (getaddrinfo.c:1173)
==12842==    by 0x4B17EC7: getaddrinfo (getaddrinfo.c:2391)
==12842==    by 0x48E0C23: Curl_getaddrinfo_ex (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48E6E57: async_thrdd_item_process (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49372AF: thrdslot_run (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48D1703: curl_thread_create_thunk (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4A8582B: start_thread (pthread_create.c:447)
==12842==    by 0x4AEB8DB: thread_start (clone.S:79)
==12842==
==12842== 248 bytes in 1 blocks are possibly lost in loss record 4 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x11365F: custom_calloc (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x490853F: Curl_thrdpool_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49089B3: Curl_thrdq_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495DDCB: Curl_multi_handle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x496D3A7: curl_easy_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x12E85F: operate (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==    by 0x1128DF: main (in /home/runner/work/curl/curl/bld/src/.libs/curl)
==12842==
==12842== 272 bytes in 1 blocks are possibly lost in loss record 5 of 5
==12842==    at 0x488C0AC: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==12842==    by 0x400F553: calloc (rtld-malloc.h:44)
==12842==    by 0x400F553: allocate_dtv (dl-tls.c:370)
==12842==    by 0x400FF5F: _dl_allocate_tls (dl-tls.c:629)
==12842==    by 0x4A86257: allocate_stack (allocatestack.c:429)
==12842==    by 0x4A86257: pthread_create@@GLIBC_2.34 (pthread_create.c:655)
==12842==    by 0x48E1977: Curl_thread_create (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x48E5BDF: thrdpool_signal (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x49374FF: Curl_thrdq_send (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937667: async_thrdd_query (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4937F0F: Curl_async_getaddrinfo.part.0 (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959193: hostip_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959A23: Curl_resolv (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4959BE3: cf_dns_start (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495D5FF: cf_dns_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x4952227: Curl_conn_connect (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495BA43: multi_runsingle (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==    by 0x495C80F: multi_perform (in /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4.8.0)
==12842==
== Contents of files in the log/3/ directory after test 20
=== Start of file commands.log
```
Ref: https://github.com/curl/curl/actions/runs/39744870127/job/119710798715#step:45:181
@vszakats vszakats changed the title test20: allow retry on valgrind runtests: allow retry behavior for threaded tests Oct 23, 2026
@vszakats vszakats changed the title runtests: allow retry behavior for threaded tests runtests: enable retries for threaded tests Oct 23, 2026
@vszakats vszakats closed this in a096c5b Oct 23, 2026
@vszakats
vszakats deleted the test20-retry branch October 23, 2026 09:12
vszakats added a commit that referenced this pull request Oct 28, 2026
Making test 20 run again:
```
Missing tests (have not been seen running for at least 3 days)
curl | 20
```
Ref: https://testclutch.curl.se/static/reports/tests-run.html#missing

Reported-by: Dan Fandrich
Follow-up to a096c5b #23552

Closes #23666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech tests

Development

Successfully merging this pull request may close these issues.

2 participants