Closed bdonlan closed 4 years ago
WSL currently does not allow exec when the caller is not the threadgroup leader. This is what is causing the ENOMEM (granted that may not be the best error code in this case). I don't know why the exec ends up on a different thread in some circumstances, but this is expected to work in a Linux environment.
ENOMEM
on exec
.Fixed in 18342.
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If you have a feature request, please post to the UserVoice.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump\".
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt) Microsoft Windows [Version 10.0.17134.556]What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
When executing the following test program in a loop, intermittently (< 1% frequency), the exec call fails with ENOMEM:
You can build and run this with the following command (after
apt install golang
):Additionally, once this fails, it will continue failing for the life of the process.
execve
should succeed reliably when the system has sufficient memory (in my case, >5GB of standby memory reported).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).See our contributing instructions for assistance.