microsoft / microsoft/vscode-cpptools

pickRemoteProcess fails with "Killed by signal 1" when using old ProxyJump

Open
#11,544 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Bug

When doing a pickRemoteProcess over ssh from a WSL centos7 guest to a remote machine using an ssh jump host, the older version of ssh on centos7 exits with signal 1 after running the ps command, and the pickRemoteProcess handler treats this as a fatal error and fails to start debugging.

  • vscode running on windows
  • remote-wsl guest is centos7
  • ssh version is OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 (doesn't repro with ubuntu-22.04 wsl guest with newer ssh, for example)
  • launch.json highlights:
			"processId": "${command:pickRemoteProcess}",
			"pipeTransport": {
				"debuggerPath": "/usr/bin/gdb",
				"pipeProgram": "/usr/bin/ssh",
				"pipeArgs": [
					"-oProxyJump=jumphost",
					"user@remotehost"
				]
			},

  • starting debugging results in a popup: "Killed by signal 1"
    image
  • the Extension Host (Remote) output window shows this error:
2023-10-17 18:15:22.132 [error] Error: Killed by signal 1.

	at /home/user/.vscode-server/extensions/ms-vscode.cpptools-1.17.5-linux-x64/dist/main.js:59549:24
	at ChildProcess.exithandler (node:child_process:412:7)
	at ChildProcess.emit (node:events:513:28)
	at maybeClose (node:internal/child_process:1091:16)
	at ChildProcess._handle.onexit (node:internal/child_process:302:5) extension.pickRemoteNativeProcess {"value":"ms-vscode.cpptools","_lower":"ms-vscode.cpptools"}
  • examining the remote-attach output window reveals the source (the last line):
Linux
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
    1 systemd                                           /usr/lib/systemd/systemd --switched-root --system --deserialize 21
...
...
27437 bash                                              -bash
Killed by signal 1.

while the ps command was successful, the nested ssh (for some reason) exits with signal 1.

  • running the ssh command directly in the centos7 wsl guest shows the same 'error':
user@centos7$ ssh -oProxyJump=jumphost user@remotehost echo

Killed by signal 1.

(this only happens with the older ssh on centos7, newer versions of ssh don't exit like this when using a jump host)

it would be great if the pickRemoteProcess code could ignore this signal 1 exit and continue with parsing the output from the ps command.

Extension version: 1.17.5
VS Code version: Code 1.83.0 (e7e037083ff4455cf320e344325dacb480062c3c, 2023-10-03T16:12:16.321Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
Remote OS version: Linux x64 4.4.0-19041-Microsoft
Connection to 'wsl+centos7' could not be established

System Info
Item Value
CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2904)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 47.85GB (6.56GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: CentOS7
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2904)
Memory (System) 23.40GB (11.61GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 4.4.0-19041-Microsoft
CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2901)
Memory (System) 47.85GB (6.54GB free)
VM 0%

Connection to 'wsl+centos7' could not be established

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the pickRemoteProcess handler associated with the extension.pickRemoteNativeProcess error and compare it with the remote-attach output shown in the report. Reproduce the CentOS 7 OpenSSH 7.4 ProxyJump case, then verify that a signal 1 exit does not discard successfully returned ps output and that process selection can continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.