Closed sfullmer closed 9 months ago
Could you use proper markdown syntaxes in your question please? The strace output and the commands are hardly readable.
Could you use proper markdown syntaxes in your question please? The strace output and the commands are hardly readable.
Interesting. It tells me at the bottom of the edit page "Styling with Markdown is supported", so I'm not sure what you're hoping for. The strace commands all start with PID and there's only one command to run. 'cmd.exe'. I'll see what I can do though. I'll try marking as code block.
Wow. I feel a bit silly. Even though I quoted the line from the edit, I kept adding a 'not' into this text: Styling with Markdown is supported. Many apologies if this appeared obtuse. Thanks for your suggestion Biswa96! If there's anything else I can add to improve the readability of the issue, please let me know. Cheers.
More straightforward repro:
$ export FOO=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
$ export FOO=$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO
$ export FOO=$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO$FOO
$ export WSLENV=FOO
$ cmd.exe /c ver
# hangs here
[edit] More amusing screencap update after a wsl.exe --shutdown
in another console. I mean, I wouldn't call the fail catastrophic. That seems a little exaggerated. :)
Failure mode a little different on 20236. At least it doesn't hang.
At least it doesn't hang.
Internally, it timed out (ETIMEDOUT) after 10 seconds in poll(2). The environment parsing in LxssManager maybe related to this.
Can confirm, is there a workaround available?
i found a way but not that funny. For me i needed a PATH variable added from WSL to Windows.
export PATH_WSL=/mnt/c/somepath:/mnt/c/someotherpathexceedinglimits
export WSLENV=PATH_WSL/l
# then call the windows exe
cmd /V /c "set PATH=%PATH_WSL%;%PATH% && the_command"
How calling the commands struggles me, is there a possibility to hook this into some pre-windows-exe calls?
Is it possible to somehow add a hook here:
sudo echo ":WSLInterop:M::MZ::/init:" > /proc/sys/fs/binfmt_misc/register
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
Not a system crash (but can include minidump if that makes sense, please let me know).
Version: Microsoft Windows [Version 10.0.19041.84]
I am using the Ubuntu build with WSL 2. here is the info from wsl -l -v NAME STATE VERSION
The problem occurs with the WSL 2 / Ubuntu-18.04 instance (the running instance).
I'm attempting to set environment variables for use within cmd.exe when it is run from specific WSL 2 instances. Below is the export statements I'm using to generate the environment variables.
SAMPLE OF ENVIRONMENT VARS FOR WSL 2
END OF ENV VARS
If I execute cmd.exe after setting the environment vars above, cmd.exe will hang. I have to restart my WSL 2 instance in order to run cmd.exe again. This restart must happen even after setting the WSLENV to blank. If I reduce the amount of WSLENV variables, for example by removing LIBPATH, then cmd.exe will load and the included variables will be exposed.
To reiterate:
What's wrong / what should be happening instead: My expectation is the cmd.exe will start and that running 'set' from the command line should display my exported environment.
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).NOTE: Command was aborted via kill -9 9038 from another WSL 2 command prompt.