-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Linux] Failed to initialize CoreCLR, HRESULT: 0x8007000E #13027
Comments
This error code means "out of memory". How much memory does your Linux device have? And if it is running in a container, does it have a memory limit set? |
LiteSpeed, shared hosting 768MB RAM, 500MB Storage. I create a small C program to test memory_limit. On blog, author tried many way but:
Root require? |
This is very strange. Looking at the strace log, something keeps trying to allocate 128MB, it fails, then 64MB and it succeeds and releases the memory immediately. This occurs 17 times in the log. Based on the fact that it passes MAP_NORESERVE to mmap, it is not coreclr code. We never pass in such flag. However this may be completely benign. |
ulimit -v Is it valid? |
So that's the problem. Your limit is slightly below 2GB (2146435072 bytes). So after .NET core reserves 1908342784 bytes of virtual address space, there is only about 227MB of that address space left. So when we try to reserve another 256MB (that would be virtual address space space for the GC heap), we fail. |
Same error. ulimit -v prints |
@janvorli Same message and same error code. My app is only slightly more complex than hello world. I’ve already found the reason, apparently .NET core doesn’t like WSL’s mounted file system. It works fine when I copy the binaries to Linux native portion of the file system, e.g. to ~/ |
@Const-me interesting, I'll take a look into why the different file system results in an OOM. |
@Const-me, Thanks! I turned off WSL and |
@janvorli Thank you for your explain.
No, my hosting provider does not allow to change any system settings. Just test on another hosting with |
We cannot do anything with it at the moment, however it seems it would make sense to make .NET Core aware of the virtual memory limit and reduce the initial virtual memory range reservation based on that. It currently doesn't expect any virtual memory limits. |
Comigo ta Este Codigo De Problema Tambem, Eu Tento Adicionar O Negocio Do Terminal.GUI Mais Da Nisso: C:\Users\cLiEnTe\Documents\Csharp-Projects\Terminal-01>dotnet add package Terminal.GUI Detalhes Do Meu Notebook: |
@janvorli, I'm under the impression that you fixed this in #79612, so perhaps this issue could be closed now? |
Right, I have forgotten to close this issue. Thank you for spotting this. |
Just test a hello world console application on linux x64.
log.txt: https://gist.github.com/htdag/86d3974c2602d565a81805849cb2755c
.NET Core 2.2
Edit: same as https://givemeans.wordpress.com/2018/05/21/php-exec-running-dotnet-new-mvc-out-of-memory/
The text was updated successfully, but these errors were encountered: