Skip to content

GHA/linux: fix thread sanitizer error output - #18274

Closed
vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:tsan-cm
Closed

vszakats wants to merge 6 commits into
curl:masterfrom
vszakats:tsan-cm

Conversation

@vszakats

@vszakats vszakats commented Aug 13, 2025 •

Copy link
Copy Markdown
Member

Replace autotools with cmake to avoid libtool wrappers that are changing
LD_LIBRARY_PATH in a way incompatible with the thread sanitizer.

To fix the output when the sanitizier is finding something:

==51718==WARNING: Can't write to symbolizer at fd 7
 /usr/bin/llvm-symbolizer-18: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18)
 /usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/openssl/lib/libcrypto.so.3: undefined symbol: __tsan_func_entry

Ref: https://github.com/curl/curl/actions/runs/16911402500/job/47913783729#step:39:4466

After:

 13:50:04.117885 == Info:ThreadSanitizer: thread T1  finished with ignores enabled, created at:
  closing connection #0
     #0 pthread_create <null> (libtests+0x6bc0f) (BuildId: 4fe889446291259934205ac03931c397aa0210d3)
     #1 Curl_thread_create /home/runner/work/curl/curl/lib/curl_threads.c:73:6 (libcurl.so.4+0x55a76) (BuildId: cb0f14ba2ad68c9cab0c980d9a5d7a53cc0782da)
     #2 async_thrdd_init /home/runner/work/curl/curl/lib/asyn-thrdd.c:500:26 (libcurl.so.4+0x1c153) (BuildId: cb0f14ba2ad68c9cab0c980d9a5d7a53cc0782da)
[...]

Ref: https://github.com/curl/curl/actions/runs/16939193922/job/48003405272?pr=18274#step:39:4018

Also:

  • disable memory tracker which turned out to be incompatible with
    the thread sanitizer and detaching threads.
    Ref: fix threaded resolver shutdown #18263 and #curl IRC.
  • the job is ~30 seconds faster after this patch.

Reported-by: Stefan Eissing
Bug: #18263 (comment)
Follow-up to a2bcec0 #14751

@github-actions github-actions Bot added the CI Continuous Integration label Aug 13, 2025
@vszakats
vszakats marked this pull request as draft August 13, 2025 13:15
@github-actions github-actions Bot added the tests label Aug 13, 2025
@vszakats vszakats changed the title GHA/linux: try using cmake for the tsan job GHA/linux: use cmake for the thread sanitizer job Aug 13, 2025
@vszakats vszakats added the build label Aug 13, 2025
This reverts commit b6862f3.

Works OK.
@vszakats
vszakats marked this pull request as ready for review August 13, 2025 14:08
@vszakats vszakats changed the title GHA/linux: use cmake for the thread sanitizer job GHA/linux: fix the error output of the thread sanitizer Aug 13, 2025
@vszakats vszakats changed the title GHA/linux: fix the error output of the thread sanitizer GHA/linux: fix error output of the thread sanitizer Aug 13, 2025
@vszakats vszakats changed the title GHA/linux: fix error output of the thread sanitizer GHA/linux: fix thread sanitizer error output Aug 13, 2025
@vszakats vszakats closed this in 2a46df3 Aug 13, 2025
@vszakats
vszakats deleted the tsan-cm branch August 13, 2025 16:34
vszakats added a commit to vszakats/curl that referenced this pull request Sep 23, 2025
Same issue as seen earlier in the tsan job. Fix it the same way, by
switching to cmake to avoid autotools' libtool confusing the analyzer.
Ref: 2a46df3 curl#18274

Configuration remains identical. I removed libssh2 from the installed
packages, because it was unused before, but cmake enabled it by default
and libssh2 has many memory leaks:
Ref: https://github.com/curl/curl/actions/runs/17941312820/job/51018425159

```
/usr/bin/llvm-symbolizer-18: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18)
 /usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: undefined symbol: __asan_option_detect_stack_use_after_return
 ==33900==WARNING: Can't read from symbolizer at fd 3
 [..]
 ==33900==WARNING: Can't write to symbolizer at fd 6
 ==33900==WARNING: Failed to use and restart external symbolizer
```
Ref: https://github.com/curl/curl/actions/runs/17939949191/job/51013953675?pr=18693

Cherry-picked from curl#18693
vszakats added a commit that referenced this pull request Sep 23, 2025
Same issue as seen earlier in the tsan job. Fix it the same way, by
switching to cmake to avoid autotools' libtool confusing the analyzer.
Ref: 2a46df3 #18274

Configuration remains identical. I removed libssh2 from the installed
packages, because it was unused before, but cmake enabled it by default
and libssh2 has memory leaks:
Ref: https://github.com/curl/curl/actions/runs/17941312820/job/51018425159

Fixing:
```
/usr/bin/llvm-symbolizer-18: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18)
/usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: undefined symbol: __asan_option_detect_stack_use_after_return
==33900==WARNING: Can't read from symbolizer at fd 3
[..]
==33900==WARNING: Can't write to symbolizer at fd 6
==33900==WARNING: Failed to use and restart external symbolizer
```
Ref: https://github.com/curl/curl/actions/runs/17939949191/job/51013953675?pr=18693

Cherry-picked from #18693
Closes #18696
vszakats added a commit that referenced this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI Continuous Integration tests

Development

Successfully merging this pull request may close these issues.

1 participant