Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 15381 [details]
The attached repo code fills up my memory up to 30-35 GB, then Mono reports the following error and dies:
Error: Garbage collector could not allocate 16384 bytes of memory for major heap section.
Hardware: CPU 24 Cores, RAM 96 GB
Executed via: Docker 1.10.2
OS: Linux Ubuntu 15.10
Kernel Version: 4.2.0-30-generic
Mono: Mono JIT compiler version 4.5.0 (Nightly 184.108.40.2062/2ed8402 Thu Mar 10 19:38:40 UTC 2016)
LLVM: supported, not enabled.
also tried with: Mono 4.2.3 and Mono 220.127.116.117
Tried with default MONO_GC_PARAMS and with MONO_GC_PARAMS="nursery-size=2g" . Outcome is the same.
Created attachment 15382 [details]
strace log file
Created attachment 15383 [details]
strace -e mmap logifle with complete error
Created attachment 15384 [details]
Couldnt create Thread exception after mmap errors
Created attachment 15385 [details]
strace mmap file with exact errors as in headline
It actually turned out that it has been a problem with the NUMA based architecture of the computer I ran the application on. The application ran inside of a docker container, which was running on top of a VM, which was scheduled to use 96 GB and 24 cores of a NUMA based compute node. Turned out that Linux KVM as my Hypervisor uses a "strict mode" for NUMA nodes, that limits the usable amount of memory per node to the node's own memory. This means the VM with 24 cores can only use 48GB of memory and silently fails with not being able to allocate more memory.
However the Mono Test codes fails with the same error, when being run on the native NUMA machine. So could there be a possible problem with NUMA architecture and Mono?
I will open another issue for the NUMA stuff
The NUMA error is further tracked here: https://bugzilla.xamarin.com/show_bug.cgi?id=39759
I see the same error running mono v4.0.4, v4.4.2, v4.6.1 on ARMv7 linux.
System with 1Gb RAM.
After allocating about 271M, mono dies with Garbage collector could not allocate 16384 bytes of memory for major heap section.
In my opinion this issue is not only related to NUMA architecture and is still present for "regular" ARM linux systems.