Hi,
When running mongod inside a container based on mongo:8.0.9-noble on Raspberry 5 [balenaOS 5.3.22], I’m getting following error which I’m not getting on the generic-AARCH64 OS:
12 src/third_party/tcmalloc/dist/tcmalloc/system-alloc.cc:755] MmapAligned() failed - unable to allocate with tag (hint=0x4c8680000000, size=1073741824, alignment=1073741824) - is something limiting address placement?
12 src/third_party/tcmalloc/dist/tcmalloc/arena.cc:48] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes=131072, object-size=640); is something preventing mmap from succeeding (sandbox, VSS limitations)?
According to Envoy 1.17-1.23 unable to start on Raspberry · Issue #23339 · envoyproxy/envoy · GitHub, this could be avoided by compiling the kernel with CONFIG_ARM64_VA_BITS_48=y.
The kernel is compiled with:
CONFIG_ARM64_VA_BITS_48=n
CONFIG_ARM64_VA_BITS=39
This means the kernel is limited to a 39-bit virtual address space, which allows addressing up to 512 GB of virtual memory. The address 0x4c8680000000
is well beyond the 39-bit limit:
- 39-bit max address:
0x7FFFFFFFFF
(512 GB) - Your hint address:
0x4c8680000000
(≈ 5 TB)
So the kernel cannot map memory at that high address because it’s outside the allowed virtual address range.
Has this changed in newer kernels otherwise this may be something to look into for a future kernel update?
How could I retrieve the kernel configuration of a certain OS without having to install it?
I’m probably going to revert to an older mongo version that does run on the current kernel