Skip to content

test_dtrace fails on Windows Server 2025 #138744

Closed

Description

@picnixz

Bug report

Bug description:

GitHub Actions is in the process of migrating windows-latest from windows-2022 to windows-2025:

This change will be rolled out over a period of several weeks beginning 2025-09-02 and will complete on 2025-09-30

actions/runner-images#12677

This is causing failures for forks which have already been migrated, for example:

======================================================================
FAIL: test_function_entry_return (test.test_dtrace.DTraceNormalTests.test_function_entry_return)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 38, in normalize_trace_output
    result.sort(key=lambda row: int(row[0]))
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 38, in <lambda>
    result.sort(key=lambda row: int(row[0]))
                                ~~~^^^^^^^^
ValueError: invalid literal for int() with base 10: 'dtrace: failed to compile script D:\\a\\cpython\\cpython\\Lib\\test\\dtracedata\\call_stack.d: line 3: pid provider is not installed on this system'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 124, in test_function_entry_return
    self.run_case("call_stack")
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 119, in run_case
    actual_output, expected_output = self.backend.run_case(
                                     ~~~~~~~~~~~~~~~~~~~~~^
        name, optimize_python=self.optimize_python)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 53, in run_case
    actual_output = normalize_trace_output(self.trace_python(
        script_file=abspath(name + self.EXTENSION),
        python_file=abspath(name + ".py"),
        optimize_python=optimize_python))
  File "D:\a\cpython\cpython\Lib\test\test_dtrace.py", line 42, in normalize_trace_output
    raise AssertionError(
        "tracer produced unparsable output:\n{}".format(output)
    )
AssertionError: tracer produced unparsable output:
dtrace: failed to compile script D:\a\cpython\cpython\Lib\test\dtracedata\call_stack.d: line 3: pid provider is not installed on this system

https://github.com/picnixz/cpython/actions/runs/17610564159/job/50031376950#step:1:9

Upstream and my fork are still on 2022, but let's pin to windows-2022 so we can separately investigate and fix for 2025, and then pin to windows-2025.


(Copied verbatim from #138743)

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    infraCI, GitHub Actions, buildbots, Dependabot, etc.
    on Sep 10, 2025
  2. added a commit that references this issue on Sep 10, 2025
  3. added a commit that references this issue on Sep 10, 2025
  4. added 6 commits that reference this issue on Sep 10, 2025
  5. vstinner commented on Sep 10, 2025

    @vstinner
    Member

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/dtrace

    Beginning with Windows Server 2025, dtrace is included as a built-in tool.

    Before, test_dtrace was skipped since the dtrace command was missing.

  6. added a commit that references this issue on Sep 10, 2025
  7. added a commit that references this issue on Sep 13, 2025
  8. 4 remaining items

  9. vstinner commented on Feb 10, 2026

    @vstinner
    Member

    Good idea, I wrote #144657 to skip test_dtrace on Windows in the 3.14 branch.

  10. added 2 commits that reference this issue on Feb 10, 2026
  11. added a commit that references this issue on Feb 10, 2026
  12. added 2 commits that reference this issue on Feb 10, 2026
  13. chris-eibl commented on Feb 10, 2026

    @chris-eibl
    Member

    Thanks for doing this @vstinner. Having those tests pass skipped on Windows 2025 Servers is great.

    Regarding upgrading the GitHub Actions I have a question:
    Looking at https://github.com/python/release-tools/blob/main/windows-release/stage-build.yml, windows-2022 is taken to build the official release binaries. AFAIU @zooba, this should be kept for 3.13 and 3.14.
    But for 3.15 we'd like to parameterize it to be able to use windows-2025-vs2026 (until windows-2025 gets VS 2026 in May) to be able to build with tailcalling support for Windows. See also #144679.

    Shouldn't we use the same version to build in CI, that is stay on windows-2022 for the 3.13 and 3.14 branches?

  14. added a commit that references this issue on Feb 10, 2026
  15. zooba commented on Feb 11, 2026

    @zooba
    Member

    Realistically, the OS is going to have no impact on the produced binaries, so I'm not worried about that.

    Changing VS version implies different compilers being available, and different Windows SDK install being available. Generally, WinSDK updates are irrelevant (I'm only aware of one exception to this in the last ~decade), and MSVC updates are usually worth it. Nothing in the C ABI is going to change with a new compiler (the C++ ABI would, which is why we don't use it), but more importantly we may need to change the files that are distributed (e.g. the addition of vcruntime140_1.dll).

    If the test suites all pass on VS 2026, either because toolset v143 is available on all the machines or v145 doesn't cause any breakage, and no additional files need to be redistributed, then I see no harm in updating them all.

  16. added a commit that references this issue on Feb 12, 2026
  17. added a commit that references this issue on Feb 15, 2026
  18. vstinner commented on Feb 16, 2026

    @vstinner
    Member

    test_dtrace is now skipped on Windows in 3.13, 3.14 and main branches.

    The main branch now uses windows-2025 CI image in GitHub Action.

    The initial issue (test_dtrace fails on Windows Server 2025) has been fixed. I close the issue.

    Changing VS version implies different compilers being available, and different Windows SDK install being available.

    #144680 prepares Python 3.15 for Visual Studio 2026.

  19. added a commit that references this issue on Feb 28, 2026
  20. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsinfraCI, GitHub Actions, buildbots, Dependabot, etc.testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions