Skip to content

processhelp.pm: improve task info in trace output (Windows) - #23467

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:w-prochelp
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:w-prochelp

Conversation

@vszakats

@vszakats vszakats commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Follow-up to 2701ac6 #19421
Cherry-picked from #23306

- show `Get-CimInstance` info for the actual PID (not just its
  children.)
  It includes the command-line.

- work around PowerShell truncating output lines at 80 columns.
  Ref: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/out-string

- de-duplicate Windows-specific tracing code.

Follow-up to 2701ac6 curl#19421
@vszakats vszakats added tests Windows Windows-specific labels Oct 18, 2026
@vszakats
vszakats marked this pull request as draft October 18, 2026 01:30
@testclutch

Copy link
Copy Markdown

Analysis of PR #23467 at 851dd540:

Test ../../tests/http/test_60_h3_proxy.py::TestH3Proxy::test_60_12_quic_session_resumption failed, but it has been permanently failing lately, so it's probably NOT a fault of the PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (4, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test ../../tests/http/test_12_reuse.py::TestReuse::test_12_01_h1_conn_close[http/1.1] 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).

Generated by Testclutch

@vszakats
vszakats marked this pull request as ready for review October 18, 2026 13:33
@vszakats

Copy link
Copy Markdown
Member Author

Tested locally in isolation, I can't find this triggered in test runs here, or in #23306.

@vszakats vszakats closed this in dc99e12 Oct 18, 2026
@vszakats
vszakats deleted the w-prochelp branch October 18, 2026 14:32
@vszakats vszakats mentioned this pull request Oct 18, 2026
9 of 10 tasks
vszakats added a commit that referenced this pull request Oct 18, 2026
- in jobs building tests, also run them.
- to maintain CI cycle times, only run unit tests by default, and run
  all (supported) tests in just one job, carefully selected to be the
  one running them the fastest.
  Per job, it takes ~15 seconds to run ~80 unit tests.
  It takes 5 minutes to run all (~1600) tests. Total job time 5.5-6
  minutes.
  If the full test run turns out to be annoying or grow slow, we disable
  or limit it to a subset of tests.
- run tests with `-j10` parallelism. It results in the fastest runs,
  based on tests.
- to avoid the MSBuild test breaker heuristics, and to improve
  performance, run tests by directly invoking `runtests.pl` (not via
  CMake -> MSBuild -> `runtests.pl`).
  It saves 10-40 seconds per full test run.
- when running directly via `runtests.pl`, exclude test 1119 and 1167.
  It's not compatible with Visual Studio generator builds.
- run the artifact upload in parallel with running tests.

Running Windows tests in multiple environments makes it more likely they
can run on local machines, too, also making them easier to debug.
AppVeyor also supports remote access via RDP, which may help debugging
notorious Windows issues live, with some luck of reproducing it in a run
with RDP access explicitly enabled beforehand.

Fixes/improvements via this PR, merged separately:

dc99e12 #23467 processhelp.pm: improve task info in trace output (Windows)
70f3f85 #23471 test1488: drop unused C preprocessor logic
af9d2dd #23336 cmake: fix preconditions for option `CURL_STATIC_CRT=ON`
adf8b78 #23428 setopt: fix setting `CURLWS_NOAUTOPONG` with compilers lacking C99 bool type
780405b #23416 tests: add `--dump-module-paths` debug option (Windows)
bc22977 #23400 msvc: replace debug CRT GUI popups with stderr output
87a1dc7 #23396 appveyor: minor improvements
67f3510 #23381 runtests: add `-S` option to show success logs
e9af987 #23378 tests/server: fix crashing with VS2013 and earlier
8cdee8a #23377 lib557: exclude three floating point test cases for VS2013 and earlier
1aac64a #23375 test1119, 1167: disable MSYS2 argument conversion narrowly
49f003f #23337 unit1664: add workaround for VS2019 16.3 - VS2022 17.4 x64 miscompile
b8f71d6 #23345 test428: skip when running on older MSYS2 versions
2f3f99d #23339 test1119, 1167: disable MSYS2 argument conversion
098d3a0 #23332 runtests: unset `CURL_MEMDEBUG` for curl requests made to the CI API
d3e7caf #23335 GHA/windows: drop unused `-ac` runtests options
2874cc6 #23317 mqttd: work around bogus VS2019 32-bit compiler warning
e8adc72 #23315 schannel: fix guard for old MSVC workaround

Follow-up to 41198e0 #20390

Closes #23306
@vszakats

vszakats commented Oct 18, 2026 •

Copy link
Copy Markdown
Member Author

Here's an example:

test 5017 [httpsig: user-supplied Signature header skips siTask info (via tasklist) for 3528 before taskkill: ' | Image Name:   perl.exe | PID:          3528 | Session Name: Console | Session#:     1 | Mem Usage:    11,476 K | Status:       Unknown | User Name:    APPVEYOR-VM\appveyor | CPU Time:     0:00:00 | Window Title: N/A | '
Task info (via Get-CimInstance) for 3528 before taskkill:

ProcessId ParentProcessId Name     CommandLine
--------- --------------- ----     -----------
     3528            6844 perl.exe C:\msys64\usr\bin\perl.exe -I. -I../../tests ../../tests/ftpserver.pl
                                     --pidfile log/8/server/ftp_server.pid --logfile log/8/ftp_server.log
                                     --logdir log/8 --portfile log/8/server/ftp_server.port --srcdir
                                     ../../tests --proto ftp --ipv4 --port 0 --addr 127.0.0.1

Task child processes for 3528 before taskkill:

ProcessId ParentProcessId Name        CommandLine
--------- --------------- ----        -----------
     6264            3528 servers.exe C:\projects\curl\_bld\tests\server\Debug\servers.exe sockfilt --ipv4
                                        --port 0 --pidfile log/8/server/ftp_sockctrl.pid --portfile
                                        log/8/server/ftp_server.port --logfile log/8/ftp_sockctrl.log

Executing: 'taskkill -f -t -pid 3528 >/dev/null 2>&1'
gning]
--pd---em-- OK (1853 out of 1866, remaining: 00:03, took 1.794s, duration: 07:45)
test 5018 [httpsig: PUT upload]

https://ci.appveyor.com/project/curlorg/curl/build/job/632q9ekuqp6hry9o?fullLog=true#L5438
CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests

I can imagine that killing the perl.exe PID might cause broken pipes, which
the parent process end up waiting forever (on Windows, due to an unfixed
endless loop in Perl).

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

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants