Skip to content

CI/windows: add torture tests with Schannel - #19865

Closed
vszakats wants to merge 15 commits into
curl:masterfrom
vszakats:wtort2
Closed

vszakats wants to merge 15 commits into
curl:masterfrom
vszakats:wtort2

Conversation

@vszakats

@vszakats vszakats commented Dec 7, 2025 •

Copy link
Copy Markdown
Member

With Schannel and Unicode, -shallow=13. It finishes in 12 minutes,
making it the slowest Windows job. It's still on par with torture jobs
on other platforms (though they manage to fit -shallow=25).

Also -shallow=13 still caught leaks in multiple tests.

Also:

  • test2300: exclude from CI Windows torture tests.
  • experimental.

The downside of going with deeper torture tests, is that it requires
increasing the job timeout. This in turns means that a hung job takes
more minutes to be killed (due to GitHub bugs where a hung step does not
honor the per-step timeout on Windows, another bug where a hung job gets
killed +5 minutes above the workflow timeout, and another bug (or
feature?) where other failed/hung jobs in the the workflow cannot be
restarted till the last job finishes or gets killed. And all this
probably related to a Perl bug which makes it hang on fork errors, which
is turn related to Cygwin/MSYS2 runtime bugs which breaks fork in case
of curl's mixed MSYS2-Perl/native-curl-binaries environment.)
The end result in longer forced waits before being able to restart flaky
jobs, which slows down iterations and annoying.

Also tried:

  • non-c-ares job: detected known issues much less often.
  • replaced libidn2 with WinIDN: detected known issues much less often.
  • runtests -j9-j20 values: did not make a difference.
  • other -shallow values: 20 is the max feasible, but comes with the
    downside described above.

Ref: #19675 (reboot of)
Follow-up to f08417c #19863


https://github.com/curl/curl/pull/19865/files?w=1

Windows torture run times:

  • -shallow=25: step: 14m45 job: 16m40 fail: 2300
  • -shallow=20: step: 12m08 job: 14m00 fail: 2300, 1072
  • -shallow=19: step: 12m03 job: 14m36 fail: 2300?
  • -shallow=18: step: 11m25 job: 13m22 fail: 2300?, 579
  • -shallow=17: step: 10m25 job: 12m55 fail: 2300?
  • -shallow=16: step: 10m04 job: 12m33 fail: 2300?
  • -shallow=15: step: 9m37 job: 11m36 fail: 2300, 1286
  • -shallow=14: step: 9m23 job: 11m19 fail: 2300?, 579
  • -shallow=13: step: 8m55 job: 10m56 fail: 2300?, 1072, 579
  • -shallow=10: step: 7m25 job: 9m20 fail: 2300
  • -shallow=5: step: 4m47 job: 6m40 fail: 2300

@vszakats vszakats added tests Windows Windows-specific labels Dec 7, 2025
@github-actions github-actions Bot added the CI Continuous Integration label Dec 7, 2025
@testclutch

Copy link
Copy Markdown

Analysis of PR #19865 at 59478bcb:

Test 1072 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Test 2300 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 4 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@vszakats

vszakats commented Dec 7, 2025 •

Copy link
Copy Markdown
Member Author

2300 hits the same code that made to disable 1498 on Windows.

** MEMORY FAILURE
Leak detected: memory still allocated: 16 bytes
At 1350f222768, there is 16 bytes.
 allocated by D:/a/curl/curl/src/tool_doswin.c:825
Open file descriptor created at D:/a/curl/curl/src/tool_doswin.c:832.
 2300: torture FAILED: function number 50 in test.
 invoke with "-t50" to repeat this single case.
== Contents of files in the log/7/ directory after test 2300
=== Start of file commands.log
 ../src/curl.exe -q --output log/7/curl2300.out  --include --trace-ascii log/7/trace2300 --trace-time -T . ws://127.0.0.1:55699/2300 > log/7/stdout2300 2> log/7/stderr2300

That code should not be in curl IMO.

@vszakats

vszakats commented Dec 7, 2025 •

Copy link
Copy Markdown
Member Author

3207 reported a (flaky) memory leak with macOS OpenSSL:

test 3207...[concurrent HTTPS GET using shared ssl session cache]

** MEMORY FAILURE
Leak detected: memory still allocated: 63 bytes
== Contents of files in the log/13/ directory after test 3207

[...]

** MEMORY FAILURE
Mixed debug compile (../../lib/hash.c:113 at line 15619), rebuild curl now
We think 63 bytes are already allocated at that memory address: 600001b947d8!
Leak detected: memory still allocated: 95 bytes

https://github.com/curl/curl/actions/runs/20009679483/job/57377230080?pr=19865

@vszakats vszakats changed the title CI/windows: try torture tests once more CI/windows: add torture tests Dec 7, 2025
@vszakats
vszakats marked this pull request as draft December 7, 2025 23:44
vszakats added a commit that referenced this pull request Dec 8, 2025
Detected by Windows torture test 1072 (with `-shallow=20/13`),
test 579 (with `-shallow=18/14/13`), and test 1286 (with `-shallow=15`).

```
** MEMORY FAILURE
Leak detected: memory still allocated: 20 bytes
At 1a1e8136328, there is 18 bytes.
 allocated by D:/a/curl/curl/lib/curl_sspi.c:133
At 1a1e8139368, there is 2 bytes.
 allocated by D:/a/curl/curl/lib/curl_sspi.c:143
 1072: torture FAILED: function number 207 in test.
 invoke with "-t207" to repeat this single case.
Warning: http2 server unexpectedly alive
```
Ref: https://github.com/curl/curl/actions/runs/20008523913/job/57374427439?pr=19865

Also simplify the code a little.

Cherry-picked from #19865
Closes #19866
@vszakats
vszakats force-pushed the wtort2 branch 2 times, most recently from 3d61c89 to 974dae6 Compare December 8, 2025 10:42
@vszakats
vszakats marked this pull request as ready for review December 8, 2025 11:01
@vszakats vszakats changed the title CI/windows: add torture tests CI/windows: add torture tests with Schannel Dec 8, 2025
@vszakats vszakats closed this in 7dd5bb7 Dec 8, 2025
@vszakats
vszakats deleted the wtort2 branch December 8, 2025 12:08
vszakats added a commit to vszakats/curl that referenced this pull request Mar 23, 2026
vszakats added a commit that referenced this pull request Nov 10, 2026
To avoid having to do as much manual restarts at the expense of less
test coverage.

- move c-ares to builds that do not run jobs.
  To test if it helps reducing flakiness.
- reduce torture job to self-contained unit tests (ones that do not need
  a test server).
- exclude test 1085 from torture due to hanging.
- reduce dl-mingw job to self-contained unit tests.

The need for restart remains in remaining msys/mingw and msvc jobs. Also
in other jobs mainly due struggling/unreliable package distro servers,
seen with Ubuntu, Cygwin, and one MSYS2 mirror.

Ref: https://testclutch.curl.se/static/reports/summary.html
Ref: #21073
Reported-by: Stefan Eissing
Fixes #21035
Follow-up to 208b877 #21039
Follow-up to 7dd5bb7 #19865

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

Labels

CI Continuous Integration tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants