Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented May 27, 2025

@vszakats vszakats added the tests label May 27, 2025
@vszakats vszakats marked this pull request as draft May 27, 2025 06:07
@github-actions github-actions bot added the CI Continuous Integration label May 27, 2025
@vszakats
Copy link
Member Author

Flakiness still present for 1184 (Linux H3 quictls), retries fail too:
https://github.com/curl/curl/actions/runs/15268015272/job/42937143905?pr=17462#step:22:2326
"curl: (52) Empty reply from server"

@testclutch

This comment was marked as outdated.

vszakats added 4 commits May 27, 2025 09:32
https://github.com/curl/curl/actions/runs/15268239066/job/42937761553?pr=17462#step:41:3942

```
=== Start of file valgrind2077
 ==13265== 32 bytes in 1 blocks are possibly lost in loss record 40 of 95
 ==13265==    at 0x4846828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D84D11: heim_dict_set_value (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54443D3: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48ECEF1: multi_do (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
 ==13265== 69 bytes in 1 blocks are possibly lost in loss record 50 of 95
 ==13265==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D854DD: ??? (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x5D87F70: heim_string_create_with_bytes (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x544405E: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
 ==13265== 80 bytes in 1 blocks are possibly lost in loss record 53 of 95
 ==13265==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D854DD: ??? (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x5D84AEE: heim_dict_create (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x5444371: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
 ==13265== 80 bytes in 1 blocks are possibly lost in loss record 54 of 95
 ==13265==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D854DD: ??? (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x5D84AEE: heim_dict_create (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54443B7: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
 ==13265== 88 bytes in 1 blocks are possibly lost in loss record 55 of 95
 ==13265==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D84B5A: heim_dict_create (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x5444371: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48ECEF1: multi_do (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
 ==13265== 88 bytes in 1 blocks are possibly lost in loss record 56 of 95
 ==13265==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==13265==    by 0x5D84B5A: heim_dict_create (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54443B7: ??? (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4A55ED2: __pthread_once_slow (pthread_once.c:116)
 ==13265==    by 0x5D8557D: heim_base_once_f (in /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0)
 ==13265==    by 0x54065B5: krb5_init_context (in /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0)
 ==13265==    by 0x4F9EA8F: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4F9DF05: ??? (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x4FA8D87: gss_import_name (in /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0)
 ==13265==    by 0x493A384: Curl_auth_decode_spnego_message (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D694E: Curl_input_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48D6B58: Curl_output_negotiate (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BBF7F: output_auth_headers (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48BC46F: Curl_http_output_auth (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48C09ED: Curl_http (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==    by 0x48ECEF1: multi_do (in /home/runner/work/curl/curl/bld/lib/libcurl.so.4.8.0)
 ==13265==
=== End of file valgrind2077
```
@vszakats vszakats changed the title [TEST] try re-enabling some disabled tests tests: re-enable 1510, unignore 2027 2051 in GHA/macos, document heimdal memleak May 27, 2025
@vszakats vszakats marked this pull request as ready for review May 27, 2025 08:45
@vszakats vszakats closed this in 7020ba7 Jun 1, 2025
@vszakats vszakats deleted the ci-exc branch June 1, 2025 22:22
vszakats added a commit that referenced this pull request Jun 30, 2025
Replace the `libstubgss.so`-based overload solution with one built into
libcurl at compile-time.

The previous, `LD_PRELOAD`-based, solution was non-portable, allowlisted
for Linux, BSD and Solaris. It also required non-debug builds, which
turned out to be an accidental condition:
7d342c7. It also required a curl tool
built against a shared libcurl. Detecting this condition wasn't always
accurate, e.g. with certain cmake configurations.

The overload solution also didn't work on macOS, though it theoretically
should have:
- #17653
- #2394

Experiments on making the overload solution work in more envs:
- #17759
  That revealed that it also did not work on NetBSD, in CI.

The replacement solution is overloading the necessary GSS-API functions
for test 2056 and 2057 at compile time. It requires a debug-enabled curl
build (due to its insecure nature).

This makes these tests run on all platforms. Including most GSS jobs in
CI, that are running tests. (the exception is old-linux, non-debug jobs,
where it felt overkill to enable debug for this.)

The refactored GSS stub code needs to overload less than before because
it's free to use the official GSS API. (This didn't work with
the overload solution on Alpine for example). It can also use libcurl
functions, allowing to replace `snprintf()` with `msnprintf()`.

OS/400 is also overloading GSS API functions. I haven't tested how this
works after this PR. In theory it should, because this PR doesn't rely
on preprocessor overrides.

Note that for future GSS tests, it may be necessary to stub these GSS
API functions: `gss_inquire_context()`, `gss_unwrap()`, `gss_wrap()`.
They are on codepaths not (yet) touched by tests.

Also:
- stub-gss: check for token buffer overrun.
- stub-gss: replace size macros with `sizeof()`.
- GHA: enable debug for some jobs with GSS.
- GHA/linux: ignore results for 2056 and 2057 in the valgrind job.
  They leak the same way as seen with 2077 and 2078.
  Ref: 7020ba7 #17462
  Ref: 1467597 #14430
- GHA/linux: fix to ignore `gss_import_name()` leaks in valgrind builds.
  only.
- lib/vauth/krb5_gssapi: reduce variable scope.
- lib/vauth/spnego_gssapi: reduce variable scope.
- tests/libtest: drop code and build logic dealing with `libstubgss`.
- runtests:
  - drop `ld_preload` feature.
  - drop special handling of `LD_PRELOAD` env in tests.
  - drop logic dealing with shared curl tool detection.
  - drop `LD_PRELOAD` envs from tests.

Follow-up to 56d949d #1687

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

Labels

CI Continuous Integration tests

Development

Successfully merging this pull request may close these issues.

2 participants