Skip to content

[SR-3596] Cannot launch process remotely - lldb #4644

Open
@swift-ci

Description

@swift-ci
Previous ID SR-3596
Radar rdar://problem/42734612
Original Reporter rolivieri (JIRA User)
Type Bug

Attachment: Download

Environment

Linux flavor: Ubuntu 14.04 LTS
macOS: El Capitan (10.11.6)
Swift flavor: Swift Release v3.0.2

Additional Detail from JIRA
Votes 7
Component/s LLDB for Swift
Labels Bug, linux, macOS
Assignee None
Priority Medium

md5: c3787055d69bc53d527ceba2de1d86d3

Issue Description:

Linux flavor: Ubuntu 14.04 LTS
macOS: El Capitan (10.11.6)
Swift flavor: Swift Release v3.0.2

Using lldb, we have attempted to remotely launch an executable that was built using the debug configuration (swift build --configuration debug) and this always failed with the following error:

(lldb) run
error: connect remote failed (Connection refused)
error: process launch failed: Connection refused

We tried the following configurations (all resulted in the same error):

1) lldb client macOS -> lldb server running in Docker Container (Ubuntu 14.04)
2) lldb client macOS -> lldb server running on Virtual Box (Ubuntu 14.04)
3) lldb client macOS -> lldb server running on Cloud Foundry container (Ubuntu 14.04)
4) lldb client Docker container (Ubuntu 14.04) -> lldb server running on Virtual Box (Ubuntu 14.04)

Here are the steps to reproduce this problem:

1) On remote Linux server (Ubuntu 14.04), we started lldb-server:
lldb-server platform --listen *:8000

2) On the client machine, unzip the sample project in the ZIP file (swift-tst.zip). The ZIP file already contains the executable for Ubuntu 14.04. If you would like to build it again, you can do so using, for instance, a Docker image for Ubuntu 14.04 and Swift.

3) From the root folder that has the contents of the unzipped file, launch the lldb program and execute these commands (make sure you substitute <ip address server> for the IP address of the system running the lldb-server):

(lldb) platform select remote-linux
Platform: remote-linux
Connected: no
(lldb) platform connect connect://<ip address server>:8000
Platform: remote-linux
Triple: x86_64-*-linux-gnu
OS Version: 4.2.0 (4.2.0-42-generic)
Kernel: #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016
Hostname: ricardo-ubuntu14.04
Connected: yes
WorkingDir: /home/ricardo/Downloads/temp
(lldb) target create .build/debug/swift-tst
Current executable set to '.build/debug/swift-tst' (x86_64).
(lldb) run
error: connect remote failed (Connection refused)
error: process launch failed: Connection refused
(lldb)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions