WSL 3.0.3: Docker dev containers no longer open from WSL (spawn EPERM, WindowsApps folder added to PATH)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp, docker, vscode
- Ambito
- operating-systems
Direzione di ricerca
Start by comparing how WSL 3.0.1 and 3.0.3 construct the PATH passed to Windows processes; the report identifies the WSL package folder as the unexpected entry. Reproduce with cmd.exe /c set from Ubuntu and compare it with PowerShell. Done when Windows programs launched from WSL receive the expected PATH and the Dev Containers repro no longer fails with spawn EPERM.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Windows Version
Microsoft Windows [Version 10.0.19045.6466]
WSL Version
WSL version: 3.0.3.0
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
- WSL 1
- WSLC
Kernel Version
No response
Distro Version
Ubuntu 20.04.3 LTS
Other Software
- WSL: 3.0.3.0 broken, 3.0.1.0 works
- VS Code 1.108.0, Dev Containers extension 0.469.0, Docker Desktop
Repro Steps
STEPS TO REPRODUCE
- Install WSL 3.0.3 (in my case via a Microsoft Store auto-update).
- From an Ubuntu shell, run: cmd.exe /c set | grep -i windowsapps
- Compare with "cmd /c set" run from PowerShell.
Expected Behavior
The Path seen by Windows processes started from WSL is the same as the user's normal Windows Path, as on 3.0.1, with no WindowsApps WSL package folder added.
Actual Behavior
Since WSL updated itself from 3.0.1 to 3.0.3 through the Microsoft Store, no Docker dev container opens from WSL. VS Code connects to WSL but never attaches to the container, and the Dev Containers extension fails with "Error: spawn EPERM". Every container on the machine fails the same way. Opening the same folder from PowerShell still works, and rolling back to WSL 3.0.1 fixes it.
Cause: on 3.0.3, every Windows program started from WSL gets WSL's own package folder at the front of its PATH:
C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_3.0.3.0_x64__8wekyb3d8bbwe
"code ." passes that PATH to VS Code. The Dev Containers extension then finds wsl.exe in that WindowsApps folder first, and Windows refuses to start a program from WindowsApps directly, so it fails with EPERM. Programs started from PowerShell or Explorer do not get this PATH entry.
To reproduce on 3.0.3:
- In Ubuntu, run: cmd.exe /c set | grep -i windowsapps (shows the WSL package folder in Path)
- In PowerShell, run: cmd /c set | findstr /i windowsapps (does not show it)
- In Ubuntu, run "code ." in any folder with a dev container: it fails with spawn EPERM.
Diagnostic Logs
(I can take more diagnostic logs as needed)
- Lingua principale
- C++
- Stelle
- 34.4k
- Fork
- 1.9k
- Merge medio
- 1g 23h
- PR unite (30g)
- 166
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/WSL
-
feature wsl2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
microsoft/WSL#42306 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/WSL#42114 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature kernel wsl2
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/WSL#41107 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature kernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/WSL#41054 · 9 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature GPU
Difficoltà 1/5 1-3 ore Idoneità per principianti 70/100
microsoft/WSL#13592 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/WSL
Issue simili
-
needs-format
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Niko1221/Strata#6251 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: NP 管理器文件编辑器里删除键无效Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
metasequoiaime/msime#11666 ·
I maintainer di solito rispondono entro 1 giorno
-
DAE2 crashes on call.without.effects with a non ref.func expressionForse già presa @stevenfontanella l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WebAssembly/binaryen#9404 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
CodeZombie/goodluckOS#178 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
CVO-Org/immersive-cigs-rewrite#313 ·
I maintainer di solito rispondono entro 1 giorno