Skip to content

rustc --version hangs on WSL 2 while using GitHub Actions #95930

@mchernyavsky

Description

@mchernyavsky

I have a workflow with the following configuration:

name: test

on:
    push:
    pull_request:

jobs:
    test:
        runs-on: windows-2022
        timeout-minutes: 30

        steps:
            - uses: actions/checkout@v2

            - name: Set up WSL
              uses: Vampire/setup-wsl@v1
              with:
                  distribution: Ubuntu-18.04
                  additional-packages: cargo

            - name: Check environment
              shell: wsl-bash {0}
              run: rustc --version

            - name: Build
              shell: wsl-bash {0}
              run: cargo build

            - name: Test
              shell: wsl-bash {0}
              run: cargo test

            - name: Run
              shell: wsl-bash {0}
              run: cargo run

            - name: Finish check
              run: echo "Check finished successfully!"

It hangs on Check environment step for some reason:
https://github.com/mchernyavsky/test-wsl/runs/5969420585

I'm not sure what the problem is, but if I change the environment to windows-2019 everything works just fine:
https://github.com/mchernyavsky/test-wsl/actions/runs/2147461891
(windows-2019 uses WSL 1)

Previously I reported this issue to github virtual environments repo and to setup-wsl action repo, but it looks like the problem is in rustc.

Possible related issue -- #88753

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.O-windowsOperating system: WindowsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions