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-5491] LLVM ERROR: IO failure on output stream. #4979

Closed
jpsim opened this issue Jul 18, 2017 · 8 comments
Closed

[SR-5491] LLVM ERROR: IO failure on output stream. #4979

jpsim opened this issue Jul 18, 2017 · 8 comments
Labels

Comments

@jpsim
Copy link
Contributor

jpsim commented Jul 18, 2017

Previous ID SR-5491
Radar rdar://problem/33378806
Original Reporter @jpsim
Type Bug
Status Resolved
Resolution Duplicate
Environment

macOS 10.12.5, Xcode 9 beta 3 (9M174d)

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

md5: c1ecdcbd3d49afcac1d57d60d706af14

duplicates:

  • SR-5061 Assertion failed: (FD >= 0 && "File not yet open!")

Issue Description:

Running

@jpsim
Copy link
Contributor Author

jpsim commented Jul 18, 2017

This might be related to SR-5061.

@belkadan
Copy link

@aciidb0mb3r, is this something you've seen before? Or is it just almost certainly a compiler problem?

@ankitspd
Copy link
Member

I haven't seen this before let me try investigating it.

@ankitspd
Copy link
Member

@swift-ci create

@ankitspd
Copy link
Member

I can reproduce this locally. Looks like this is due to the sandboxing. @jpsim As a workaround for now you can pass `--disable-sandbox` to swift build. I ran into linking problems after passing that flag but that seems unrelated to this bug.

@jpsim
Copy link
Contributor Author

jpsim commented Jul 18, 2017

It appears the workaround also avoids the assertion failure I reported in SR-5061. The two issues likely share the same root cause IMO.

@ankitspd
Copy link
Member

It looks like the compiler is trying to create these directories, so we'll need to allow that in the sandbox.

(allow file-write-create (path "/private/var/folders/98/0fcj8gms75z3x7_01g5v_m0h0000gn/T/sources-a9889d"))
(allow file-write-create (path "/private/var/folders/98/0fcj8gms75z3x7_01g5v_m0h0000gn/T/inputs-5c6452"))

@belkadan Is this a new change? Are there more pattern that we should we aware of? These are the patterns we currently allow: https://github.com/apple/swift-package-manager/blob/master/Sources/Commands/SwiftTool.swift#L546

@belkadan
Copy link

Let's consolidate.

@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
This issue was closed.
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