-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Version
0.67.6.0
WSL Version
- WSL 2
- WSL 1
Kernel Version
Linux version 5.15.62.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Aug 24 22:24:20 UTC 2022
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
- Edit
/etc/wsl.conf
, enable systemd support. (https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/) - Run
wsl.exe --shutdown
in wsl2 shell, and reopen the shell. - Run
wsl.exe --version
or some other PE binaries, and shell will warn you that the "exec format error" or "MZ: not found"
Expected Behavior
Able to execute any valid PE binaries.
Actual Behavior
"exec format error" or "MZ: not found"
Diagnostic Logs
$ execve("/mnt/c/WINDOWS/system32/calc.exe", ["calc.exe"], 0x7ffc12cdd038 /* 37 vars */) = -1 ENOEXEC (Exec format error)
strace: exec: Exec format error
+++ exited with 1 +++
$ echo $WSL_INTEROP
/run/WSL/410_interop
$ ll /run/WSL
total 0
drwxrwxrwx 2 root root 100 9月 22 12:29 ./
drwxr-xr-x 26 root root 760 9月 22 12:29 ../
srwxrwxrwx 1 root root 0 9月 22 12:29 2_interop=
srwxrwxrwx 1 root root 0 9月 22 12:29 410_interop=
srwxrwxrwx 1 root root 0 9月 22 12:29 549_interop=
$ ll /proc/sys/fs/binfmt_misc/
total 0
drwxr-xr-x 2 root root 0 9月 22 12:29 ./
dr-xr-xr-x 1 root root 0 9月 22 12:29 ../
-rw-r--r-- 1 root root 0 9月 22 12:29 llvm-12-runtime.binfmt
-rw-r--r-- 1 root root 0 9月 22 12:29 llvm-14-runtime.binfmt
-rw-r--r-- 1 root root 0 9月 22 12:29 python2.7
-rw-r--r-- 1 root root 0 9月 22 12:29 python3.10
--w------- 1 root root 0 9月 22 12:29 register
-rw-r--r-- 1 root root 0 9月 22 12:29 status
$cat /proc/sys/fs/binfmt_misc/WSLInterop
cat: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
reynoldskr, jjmontalbo, hellow554, patrick330602, zzzachzzz and 45 morepnck, urob, unlsycn and thegreatcopnck, thegreatco and dag03tsc
Metadata
Metadata
Assignees
Labels
No labels