-
Notifications
You must be signed in to change notification settings - Fork 812
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
Bash On Windows "cannot allocate memory" for dotnet build command #1563
Comments
Hi @manikandan05 -- thanks for reporting this! Could you please provide more of the information in the ticket template? In particular, your Windows version ("OS Build") would be useful, as would an |
Hi @aseering , I have used Windows 10 machine with Bash option enabled, i have completed all the necessary configurations based on this below link https://blogs.msdn.microsoft.com/commandline/2016/04/06/bash-on-ubuntu-on-windows-download-now-3/ My system details are My Ubuntu version as 14.04 so I have followed the dotnet installation based on Microsoft described way But, i don't know why I'm stuck in this issue? Thanks for any help! |
Hi @manikandan05 -- thanks for providing more information, but I'm afraid that simply providing random extra factoids is not going to help here. I'm specifically looking for Do you not know how to gather some of that information? If not, and if you can't figure it out on your own, please feel free to ask; it'll work much faster than guessing :-) For example, you can find the OS Build by typing "About your PC" into Cortana -- this will open up a Settings panel; "OS Build" will be about halfway down the page. Incidentally, the short answer to why you're stuck at this issue is that WSL is beta software and does not yet fully and exactly emulate all edge cases of a Linux environment. And dotnet has a very sophisticated runtime that depends on some rather specific behavior of the Linux kernel. This particular error sounds to me like a compatibility issue that was theoretically fixed (or at least much-improved) in recent Windows pre-release Insider builds, which is why I asked for your exact "OS Build". If you're running stable Windows, I would advise you to try this out on an Insider build if possible. If you're already running a recent-enough Insider build, then things get more interesting, and the |
Hi @aseering , I have not installed Insider builds in my machine. Now, i will install and check this case. Apart from this, now i have shared my machine OS build version. |
Hi @aseering, I have tried all possibilities after "Insider build" option enabled in my system. But, unfortunately the same issue persists when run my ASP.NET Core application. Thanks for any help! |
Thanks @manikandan05 for sharing your OS Build! It says that you are on build 14393. (The numbers after the decimal are less important in this case, as it turns out.) This indicates that you are using the stable version of Windows, not a more-recent Insider build. The screen shot that you have shared indicates that you are currently requesting the "Release Preview" Insider build. Updated versions of WSL have only been released to the "Slow Ring" and the "Fast Ring". So you will have to choose one of those options in the dropdown menu. Note that this window says that "It will take some time to receive a build after changing your settings." What this means is that, after you change the setting in this dropdown box, you may have to wait as long as 24 or 48 hours (sometimes longer, though that's unusual in my experience). Then, new builds will start showing up as regular Windows Updates. If you want to try out a new Slow Ring build more quickly, there are two options:
Note that these options will give you a more-recent build, but they may not give you the very latest build. If you want the latest build, you have to choose the "Fast Ring" option in the window above and wait a day or two. If you're new to Insider builds, please be aware that they can cause system crashes and other problems: The version of WSL that they include is much-improved, but they bundle other new features that may introduce new bugs as well. If you're not comfortable with that risk, the safest approach is to download the VM. |
The dotnet hello world example does seem to compile and run on 14986 for what it's worth. Fifty cents says the "cannot allocate memory" problem originally reported is #851 though, which hasn't actually flushed to fast ring yet. |
I did LXR reinstall - and problem is still there. Maybe windows is not allowing console to use memory. |
@spagu - What windows build are you on? |
@benhillis #1403 (comment), some error there. |
Now, i have tried with latest OS build : 15014.1000 Preview from the below mentioned link. The ASP.NET Core sample will be working fine while creating and deploying from Bash on Windows. The sample also launched in browser without any issues (like previously mentioned cannot allocate memory not reprodued). https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ |
Calling this a dupe for want. |
Hi,
I have configured the Bash on windows in my machine and installed the necessary packages as mentioned by Microsoft.
Now, I have created one dotnet project and execute the dotnet restore command also executed successfully. But, when I'm trying to execute the
**dotnet build**
command will always show the "cannot allocate memory" issue.Thanks for any help.
The text was updated successfully, but these errors were encountered: