Hi everyone,
Just a heads-up for those running MongoDB (specifically version 8.0.21) inside LXC containers on the latest Proxmox 9.x updates.
During my Sunday maintenance window, I updated to Kernel 7.0.2-2-pve. After the reboot, my Graylog instance failed to start. Specifically, the MongoDB service was crashing silently—no obvious errors in /var/log/mongodb/mongod.log, and systemctl status only showed a generic Result: exit-code.
Bash
sudo -u mongodb /usr/bin/mongod --config /etc/mongod.conf<br>
If it returns to the prompt immediately with no output, or if dmesg on the host shows trap invalid opcode or segfault, you are likely hitting this kernel mismatch.
If anyone has managed to get MongoDB 8.x running on the 7.0.2 kernel by tweaking AppArmor profiles (unconfined) or disabling Transparent Huge Pages (THP) on the host, I'd love to hear the specific config. Until then, I’m staying on 6.17!
Just a heads-up for those running MongoDB (specifically version 8.0.21) inside LXC containers on the latest Proxmox 9.x updates.
During my Sunday maintenance window, I updated to Kernel 7.0.2-2-pve. After the reboot, my Graylog instance failed to start. Specifically, the MongoDB service was crashing silently—no obvious errors in /var/log/mongodb/mongod.log, and systemctl status only showed a generic Result: exit-code.
The Issue
It appears there is a significant incompatibility between the memory-mapping (mmap) behavior of the 7.0.2 kernel and current MongoDB builds (referencing SERVER-121912). This seems to specifically affect LXC environments where the container is restricted by the host's new kernel memory management and AppArmor profiles.Diagnostics (How to check if you're affected)
If your MongoDB fails silently on this kernel, try running it manually as the mongodb user:Bash
sudo -u mongodb /usr/bin/mongod --config /etc/mongod.conf<br>
If it returns to the prompt immediately with no output, or if dmesg on the host shows trap invalid opcode or segfault, you are likely hitting this kernel mismatch.
Working Workaround
I confirmed this is kernel-dependent by migrating the container.- Failed: Kernel 7.0.2-2-pve (Production)
- Success: Kernel 6.17.13-3-pve (Test Laptop)
If anyone has managed to get MongoDB 8.x running on the 7.0.2 kernel by tweaking AppArmor profiles (unconfined) or disabling Transparent Huge Pages (THP) on the host, I'd love to hear the specific config. Until then, I’m staying on 6.17!