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-10303] Swift CLI (REPL) on fresh Ubuntu seems broken #4598

Open
swift-ci opened this issue Apr 4, 2019 · 4 comments
Open

[SR-10303] Swift CLI (REPL) on fresh Ubuntu seems broken #4598

swift-ci opened this issue Apr 4, 2019 · 4 comments
Labels
bug Something isn't working Compiler LLDB for Swift

Comments

@swift-ci
Copy link

swift-ci commented Apr 4, 2019

Previous ID SR-10303
Radar None
Original Reporter freak4pc (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler, LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: 5efc473d44b9885839772e54f92cf230

Issue Description:

Fresh Ubuntu 18.04 installation on Docker, using instructions from Swift.org https://swift.org/download/#using-downloads

Running `swift` prints out:

root@d111086a94ff:~# swift
error: failed to launch REPL process: process launch failed: 'A' packet returned an error: 8
@weissi
Copy link
Member

weissi commented Apr 4, 2019

freak4pc (JIRA User) this happens if you run it in docker and your container isn't privileged. Swift's REPL needs a privileged container because it uses ptrace to attach to another process.
if you do

docker run -it --rm --privileged swift:5.0

it should work. However, please be aware that this has some security implications: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

In local development the security implications should be okay though 🙂

@swift-ci
Copy link
Author

swift-ci commented Apr 4, 2019

Comment by Shai Mishali (JIRA)

Thanks Johannes!
That seems to do the trick. Maybe a better error message is in order?

@belkadan
Copy link

belkadan commented Apr 4, 2019

@dcci, how hard do you think it would be to detect this situation?

@dcci
Copy link
Mannequin

dcci mannequin commented Apr 4, 2019

I think it's feasible. Let me see what I can do.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Compiler LLDB for Swift
Projects
None yet
Development

No branches or pull requests

3 participants