-
Notifications
You must be signed in to change notification settings - Fork 838
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
WSL2: EPERM error for syscall spawn #4255
Comments
The tool I'm using that tries to call spawn is |
Using sudo I was able to get the program to run. However, on native other linux distro(s), a sudo command is not required. |
Template was deleted and there is no repro to go on here. If it takes with |
We’ve labelled your issue as ‘need-repro’ since we need more steps to help identify your problem. Could you please provide us with reproducible steps for the issue you’re experiencing, including things such as the specific command line steps necessary to reproduce the behavior and their output. Thank you! -The WSL Team |
I had the same problem. I think it is related to Windows Defender, because I reproduce this problem by the following steps:
$ code .
Updating VS Code Server to version 0f3794b38477eea13fb47fbe15a42798e6129338
Removing previous installation...
Downloading: 100%
Unpacking: 100%
PS C:\Users\tcztzy> wsl --set-version Ubuntu 2
$ code . The factory method of "vs/server/remoteCli" has thrown an exception
{ Error: spawn EPERM
at ChildProcess.spawn (internal/child_process.js:358:11)
at Object.spawn (child_process.js:533:9)
at l (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remoteCli.js:86:650) at Object.<anonymous> (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remote Cli.js:88:1010)
at Function.t._safeInvokeFunction (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/l oader.js:19:945)
at Function.t._invokeFactory (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader .js:20:175)
at t.complete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:20:412) at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :614)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._resolve (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:174) at s.defineModule (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:24:534) at o (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:28:673)
at Object.l (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:36:291) at Function.t._safeInvokeFunction (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/l oader.js:19:945)
at Function.t._invokeFactory (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader .js:20:175)
at t.complete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:20:412) at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :614)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._resolve (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:174) at s.defineModule (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:24:534) at o (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:31:789)
at c (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:17:118)
at Object.<anonymous> (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remote Cli.nls.js:4:1)
at t._createAndEvalScript (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js :17:162)
at /home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:16:762
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3) errno: 'EPERM', code: 'EPERM ', syscall: 'spawn' }
Error: spawn EPERM
at ChildProcess.spawn (internal/child_process.js:358:11)
at Object.spawn (child_process.js:533:9)
at l (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remoteCli.js:86:650) at Object.<anonymous> (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remote Cli.js:88:1010)
at Function.t._safeInvokeFunction (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/l oader.js:19:945)
at Function.t._invokeFactory (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader .js:20:175)
at t.complete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:20:412) at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :614)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30 :858)
at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:858) at s._resolve (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:174) at s.defineModule (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:24:534) at o (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:28:673) at Object.l (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:36:291) at Function.t._safeInvokeFunction (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:19:945) at Function.t._invokeFactory (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:20:175) at t.complete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:20:412) at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:614) at s._onModuleComplete (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:858) at s._resolve (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:30:174) at s.defineModule (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:24:534) at o (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:31:789) at c (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:17:118) at Object.<anonymous> (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/server/remoteCli.nls.js:4:1) at t._createAndEvalScript (/home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:17:162) at /home/tcztzy/.vscode-server/bin/0f3794b38477eea13fb47fbe15a42798e6129338/out/vs/loader.js:16:762 at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3) |
I had the same problem useing VSCode on wsl2.
|
Same issue here. |
Chiming in, error message exactly the same as the ones before with according folders. Can't solve with use of |
Same, was working fine until I updated to June (1.36) release. |
To help us debug, if you're experiencing this issue could you post some steps for us to reproduce the issue? i.e: What commands you're running, or some sample code, etc. This will significantly help us narrow down the issue. |
For me it was running the |
I'd settle for a gist of the It might be possible to get the trace by swapping out 25% chance this is #4175 (message) but I can't tell for sure without seeing it die. If people here are running |
WSL2 Ubuntu. Start it up. Create a directory. cd into it. run "code .". That was it. Nothing special. |
No, it's something special. Not to imply in the pejorative sense. Providing a recipe to grab the |
I ran strace -f on my call to 'code .' and this is the error: [pid 8224] execve("/mnt/c/ProgramData/Oracle/Java/javapath/cmd.exe", ["cmd.exe", "/C", "C:\Users\Dad\AppData\Local\Progr"..., "--folder-uri=vscode-remote://wsl"..., "--remote=wsl+Ubuntu"], 0x28b7a60 /* 24 vars */) = -1 EPERM (Operation not permitted) At this point we're execve'ing to find cmd.exe in each of the directories on the path. This directory is a leftover from an old Java install. javapath is a junction: .2018-12-14 11:20 PM <JUNCTION> javapath [C:\ProgramData\Oracle\Java\javapath_target_956312] Removing this directory from my path solved the EPERM problem. |
Same problem here |
WSL2
Using
Node 12.5.0
Windows Version
10.0.18922 Build 18922
The process is being run without sudo/root permissions (it's being run as a regular user).
The text was updated successfully, but these errors were encountered: