-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hey, I've been tracking down an issue with async process I/O on Linux in Swift. I've previously used tuist/Command, and have also used my own basic re-implementation, and today I tried SwiftCommand.
So far all 3 have exhibited the same problem. On the first command invoked, the process hangs, and the following is output:
...10:58:26 <myproject>.xctest[2613:7efdec80] *** Could not create wakeup socket pair for CFSocket!!!
I've written about this here: swiftlang/swift-corelibs-foundation#5197 as well. I had assumed it was my codebase, but 3 implementations suggested to me that it must be a framework bug. However, the fact that no other applications have seen this, and the fact that SwiftCommand has a working Linux test suite, suggests that perhaps it's something complex about how my application is set up.
I can reproduce this 100% of the time when running a serial test suite written with Swift Testing. I'm using the Vapor web framework, and have various other I/O going on such as connections to Postgres.
This issue is a starting point for discussion, because I don't know where the solution will end up being, but I'd appreciate any input you can provide. Are there any issues you're aware of with SwiftCommand that could contribute to this, or could explain the hangs? Do you know of any machine state that needs to be set up correctly for it to work (I've already checked file handle limits)? Have you tried things like parallel invocation of SwiftCommand, or running it off the main thread?
Thanks in advance for your help!