Windows Version
Windows 11 25H2 (26200.8117)
WSL Version
2.6.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
6.18.20.1
Distro Version
Ubuntu 22.04
Other Software
N/A
Repro Steps
- Execute WSL2
- From windows, run
echoi echo hi | wsl -u root sh
- Note that no output appears, and the return code from wsl is "1", indicating an error.
Expected Behavior
It should return hi.
C:\Users\User>echo echo hi | wsl -u root sh
hi
C:\Users\User>
Actual Behavior
Instead of returning hi, it returns an empty string, and when checking the %ERRORLEVEL%, it returns 1.
C:\Users\User>echo echo hi | wsl -u root sh
C:\Users\User>echo %ERRORLEVEL%
1
For more detailed information, please refer to the link below:
Nevuly/WSL2-Rolling-Kernel-Issue#42
I applied workaround patch in my custom kernel, and stdin redirection work correctly again.
Nevuly/WSL2-Linux-Kernel-Rolling@38b1178
This issue has been occurring since the commit linked below was applied:
Nevuly/WSL2-Linux-Kernel-Rolling@f0c5827
Additionally, there is a note mentioning that a rare interoperability issue between Windows and WSL2 can occur after applying the temporary patch. I am attaching this information as well.
Locietta/xanmod-kernel-WSL2#155
Diagnostic Logs
N/A - You can check WSL side logs in detailed information link.
cc @chessturo
This issue is present in all kernels starting from version 6.17 up to the latest.
Windows Version
Windows 11 25H2 (26200.8117)
WSL Version
2.6.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
6.18.20.1
Distro Version
Ubuntu 22.04
Other Software
N/A
Repro Steps
echoi echo hi | wsl -u root shExpected Behavior
It should return
hi.Actual Behavior
Instead of returning
hi, it returns an empty string, and when checking the%ERRORLEVEL%, it returns 1.For more detailed information, please refer to the link below:
Nevuly/WSL2-Rolling-Kernel-Issue#42
I applied workaround patch in my custom kernel, and
stdinredirection work correctly again.Nevuly/WSL2-Linux-Kernel-Rolling@38b1178
This issue has been occurring since the commit linked below was applied:
Nevuly/WSL2-Linux-Kernel-Rolling@f0c5827
Additionally, there is a note mentioning that a rare interoperability issue between Windows and WSL2 can occur after applying the temporary patch. I am attaching this information as well.
Locietta/xanmod-kernel-WSL2#155
Diagnostic Logs
N/A - You can check WSL side logs in detailed information link.
cc @chessturo
This issue is present in all kernels starting from version 6.17 up to the latest.