Skip to content

Subprocess calls hang on Ubuntu 22.04 with Swift 6.1 in Release builds #190

@omochi

Description

@omochi

Describe the bug
Subprocess calls hang on Ubuntu 22.04 with Swift 6.1 in Release builds.

To Reproduce
It only takes calling the following.

try await Subprocess.run(
            .name("tar"),
            arguments: ["-cvf", "archive.tar", "Sources/"],
            output: .standardOutput,
            error: .standardError
        )

This can be easily reproduced with the following repository.
https://github.com/omochi/swift-subprocess-rpath-bug

Expected behavior
the call completes.

Environment (please complete the following information):

  • ubuntu 22.04
  • swift 6.1

Additional context
The issue only occurs with the combination of Swift 6.1 and Release builds.
It does not happen with Swift 6.2 or with Debug builds. You can verify this by editing the Dockerfile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions