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-2703] Investigate SwiftPM CI popen failure #5213
Comments
I tried looking around but couldn't reproduce this issue on my Ubuntu 14.04 vm |
Another failure spotted here: https://ci.swift.org/job/swift-PR-Linux/3867/console |
I have looked into this a bit, since I was hitting it on Ubuntu 10.04. It only seems to happen when running the unit tests from `Utilities/bootstrap test`, not when just running the test from the command-line. I'm going to take another look at what the differences there are. |
So, invoking `swift-test` in exactly the same manner as the bootstrap script does (`env SWIFT_EXEC=/home/user/swiftpm/.build/debug/swiftc SWIFT_BUILD_PATH=/home/user/swiftpm/.build /home/user/swiftpm/.build/debug/swift-test -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/linux`) does reproduce the problem. However, adding the test specifier flag (`-s UtilityTests.ShellTests`) doesn't trigger the bug. Only when running all the tests. |
More data as I figure things out. |
Also (perhaps unsurprisingly) the -Xlinker flags aren't relevant. |
But removing all the tests except the `UtilityTests` does trigger the error. |
Looks like the problem is with `ProgressBarTests`. If it runs before `ShellTests`, then the failure occurs. Otherwise not. |
Oh of course: that code is messing with pseudo terminals etc. |
Thanks @abertelrud for investigation, I was able to produce this locally after installing a fresh copy of Ubuntu |
Fantastic. Thank you for the fix! We should try to get this into the next Swift bugfix release. |
Additional Detail from JIRA
md5: cb318fd28fca62a433c67935148682c3
relates to:
Issue Description:
This test seems to failing a lot recently on CI for unknown reason.
Test Case 'ShellTests.testPopen' started at 03:31:05.715
fatal error: 'try!' expression unexpectedly raised an error: POSIX.ShellError.popen(["echo", "foo"], read error: Bad file descriptor (9))
https://ci.swift.org/job/oss-swift-package-linux-ubuntu-15_10/2138/console
The text was updated successfully, but these errors were encountered: