microsoft / microsoft/vscode-cpptools

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

Aperta
#11,544 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger help wanted
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Traccia l’handler pickRemoteProcess associato all’errore extension.pickRemoteNativeProcess e confrontalo con l’output di remote-attach mostrato nel report. Riproduci il caso CentOS 7 OpenSSH 7.4 ProxyJump, quindi verifica che un’uscita con il segnale 1 non scarti l’output di ps restituito correttamente e che la selezione del processo possa continuare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
devtools
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.