Skip to content

Windows tail-call CI does not run the test cases #131678

Description

@chris-eibl

Excerpts from here #131526 (comment):

See e.g. https://github.com/python/cpython/actions/runs/14006628024/job/39221297660 and https://github.com/python/cpython/actions/runs/13954576580/job/39062383429#step:4:326.

After building, no more output can be seen.

This is interesting, because

- name: Native Windows (debug)
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
shell: cmd
run: |
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.5
set PlatformToolset=clangcl
set LLVMToolsVersion=${{ matrix.llvm }}.1.5
set LLVMInstallDir=C:\Program Files\LLVM
./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3

clearly ./PCbuild/rt.bat is invoked. Maybe the reason is, because it is not used with backslashes like in

The question then is, why ./PCbuild/build.bat is working ...

Linked PRs

Activity

  1. chris-eibl commented on Mar 24, 2025

    @chris-eibl
    MemberAuthor

    comment from @Fidget-Spinner #131526 (comment)

    CI uses cmd instead if powershell, could that make a difference?

  2. chris-eibl commented on Mar 24, 2025

    @chris-eibl
    MemberAuthor

    comment from @zooba #131526 (comment)

    CI uses cmd instead if powershell, could that make a difference?

    It probably requires call PCbuild\build.bat ... to handle someone calling exit in the batch file. In Cmd, if the entire block is a batch file, then exit will break out of the top-level one, not the nested one, unless you use call.

  3. chris-eibl commented on Mar 24, 2025

    @chris-eibl
    MemberAuthor

    Yeah, I remember that pitfall having exit in a batch file that is not invoked via call. But then here

    .\\PCbuild\\build.bat
    -e -d -v
    -p "${ARCH}"
    ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
    shell: bash
    - name: Display build info # FIXME(diegorusso): remove the `if`
    if: inputs.arch != 'arm64'
    run: .\\python.bat -m test.pythoninfo
    - name: Tests # FIXME(diegorusso): remove the `if`
    if: inputs.arch != 'arm64'
    run: >-
    .\\PCbuild\\rt.bat
    -p "${ARCH}"
    -d -q --fast-ci
    ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
    shell: bash

    should be affected, too? But as @Fidget-Spinner noted, reusable-windows.yml uses shell: bash whereas tail-call.yml uses shell: cmd. And in a cmd prompt I definitely get an error for forward slashes.

    It's still not clear for me, why ./PCbuild/build.bat is called called correctly, but as @zooba notes, there are many exits in it!

  4. added
    type-bugAn unexpected behavior, bug, or error
    3.14bugs and security fixes
    on Mar 24, 2025
  5. zooba commented on Mar 24, 2025

    @zooba
    Member

    Those are separate run: elements. Each one of those is likely implemented by writing the contents of run: into randomly_named.bat and doing cmd /C .\randomly_named.bat, which then means any further batch files are nested within it. But because build.bat is the last one that runs, you don't notice if it exits all the way.

    In the other file, there are two batch files in the same run: step, so you do notice if one exits the whole step early.

  6. chris-eibl commented on Mar 24, 2025

    @chris-eibl
    MemberAuthor

    Kudos to @zooba: prepending call fixes the issue: https://github.com/python/cpython/actions/runs/14044831663/job/39323183797?pr=131690
    And reveals #131691, which I haven't noticed so far, because I only ran the full test suite for release or PGO builds ...

  7. added a commit that references this issue on Mar 28, 2025
  8. Fidget-Spinner commented on Mar 28, 2025

    @Fidget-Spinner
    Member

    Thanks!

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

    3.14bugs and security fixesOS-windowsinfraCI, GitHub Actions, buildbots, Dependabot, etc.type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions