Skip to content
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

[SR-16079] swiftpm-xctest-helper crashes when swapping sanitizers #4339

Open
adam-fowler opened this issue Mar 30, 2022 · 2 comments
Open

[SR-16079] swiftpm-xctest-helper crashes when swapping sanitizers #4339

adam-fowler opened this issue Mar 30, 2022 · 2 comments
Labels

Comments

@adam-fowler
Copy link

Previous ID SR-16079
Radar None
Original Reporter @adam-fowler
Type Bug
Environment

swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)

Target: x86_64-apple-macosx12.0

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 81090cc4329894afe64d435f0c2d4b6d

Issue Description:

It is possible to hang `swift test` by building your package using the address sanitizer and then requesting to list tests while skipping build and using the thread sanitizer. It appears `swift test` is waiting on results from `swiftpm-xctest-helper`. When you kill the `swift test` process it does not kill the `swiftpm-xctest-helper` process which continues to use 100% of one processor and will run indefinitely.

Repro steps:

git clone https://github.com/apple/swift-nio
cd swift-nio
swift build --sanitize=address --build-tests
swift test --list-tests --skip-build --sanitize=thread

Expected:

`swift test` call will either successfully return an error or provide the list of tests

Actual:

`swift test` never returns and leaves an orphaned process `swiftpm-xctest-helper` when killed.

This only occurs on macOS

@tomerd
Copy link
Member

tomerd commented Apr 12, 2022

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@adam-fowler
Copy link
Author

adam-fowler commented May 3, 2023

I thought I would verify this is still an issue. The issue has changed. It now crashes with the following message

[1/1] Planning builderror: signalled(6): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift/pm/swiftpm-xctest-helper /Users/adamfowler/Developer/server/apple/swift-nio/.build/arm64-apple-macosx/debug/swift-nioPackageTests.xctest /var/folders/6v/zhyq15kx1fz1d9hjv1zq9n8c0000gn/T/TemporaryFile.TIzRGK output:
    ==57849==Unable to find a memory range for dynamic shadow.
    ==57849==space_size = 0x100000003fff, largest_gap_found = 0x017ffffe0000, max_occupied_addr = 0x7e8000000000, new_max_vm = 0x0bfffff00000
    AddressSanitizer: CHECK failed: sanitizer_mac.cpp:1274 "((0 && "cannot place shadow")) != (0)" (0x0, 0x0) (tid=275360)
        <empty stack>

@adam-fowler adam-fowler changed the title [SR-16079] swiftpm-xctest-helper hangs when swapping sanitizers [SR-16079] swiftpm-xctest-helper crashes when swapping sanitizers May 3, 2023
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

2 participants