Skip to content

swift test is hanging on GitHub Actions, started in Swift 6.0+ #8394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
czechboy0 opened this issue Mar 20, 2025 · 6 comments
Open
1 task done

swift test is hanging on GitHub Actions, started in Swift 6.0+ #8394

czechboy0 opened this issue Mar 20, 2025 · 6 comments
Labels

Comments

@czechboy0
Copy link
Member

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

swift test is hanging on GitHub Actions, started in Swift 6.0+

Example: https://github.com/apple/swift-distributed-actors/actions/runs/13964630089/job/39092176843

GHA cancels the job after 6 hours.

Expected behavior

swift test would continue to building and running tests.

Actual behavior

swift test hangs after cloning, before building.

Steps to reproduce

I haven't been able to reproduce locally, but happens frequently on this CI job: https://github.com/apple/swift-distributed-actors/actions/runs/13964630089/job/39092176843

Swift Package Manager version/commit hash

6.0 and newer, doesn't reproduce on 5.9/5.10

Swift & OS version (output of swift --version ; uname -a)

swift:6.0-jammy container

@czechboy0 czechboy0 added the bug label Mar 20, 2025
@dschaefer2
Copy link
Member

Given you can't reproduce this locally, I'm wondering if you're just running out of memory in the jobs. I've seen that make it appear to be hanging when, for example, running an a VM with 2GB or less. Mind you that usually manifests itself in the compiler, especially building swift-syntax.

@czechboy0
Copy link
Member Author

@rnro do you know if that's something we can change?

@rnro
Copy link

rnro commented Apr 10, 2025

We are using the standard hosted GitHub runners which have 16 GB of RAM and running the Swift test jobs within a docker container.

Running free -h inside those docker containers (before any test activity has started) prints:

               total        used        free      shared  buff/cache   available
Mem:            15Gi       913Mi       6.3Gi        64Mi       8.4Gi        14Gi
Swap:          4.0Gi          0B       4.0Gi

So I don't think memory pressure should be an issue.

@dschaefer2
Copy link
Member

@rnro Yes, that should be lots. Hard pressed to understand what's happening on those machines.

@czechboy0
Copy link
Member Author

Any extra logging we can enable to help diagnose this?

@dschaefer2
Copy link
Member

You could always add --vv to the swift build command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants