Skip to content

MongoDB 8 crashes on Linux kernel ≥ 6.19 (TCMalloc/rseq incompatibility) #2

Description

@firmansyahn

Summary

MongoDB 8.0+ crashes on startup on Linux kernel 6.19 and newer. mongod exits immediately with:

MongoDB cannot start: Linux kernel versions 6.19 and newer has a known incompatibility...

Root cause is an incompatibility between the new kernel's restartable-sequences (rseq) behavior and the TCMalloc vendored inside mongod. It affects all MongoDB 8.x packages — tarball, package managers, and Docker images alike.

Impact on this collection

The mongodb role deploys MongoDB 8 on Fedora CoreOS hosts. The kernel bump can land within a single FCOS major release, so pinning the FCOS major is not enough:

FCOS build Kernel MongoDB 8
43.20260217.3.1 6.18 ✅ works
43.20260413.3.2 6.19 ❌ broken

Current handling

  • roles/mongodb/tasks/preflight.yml asserts the host kernel is < 6.19 (mongodb_unsupported_kernel) and fails fast with remediation guidance.
  • Bypass: mongodb_skip_kernel_check: true (only after verifying mongo actually runs on the kernel — running with the check disabled on an incompatible kernel crashes containers in a tight loop).
  • Documented in the mongodb role README (Gotchas) and the top-level README troubleshooting section.

Upstream status (as of 2026-06)

Not fixed. MongoDB's production notes still carry the warning and only state that the issue will resolve "as soon as a patched version of TCMalloc is available." Releases through 8.2 still inherit the broken vendored TCMalloc, so upgrading forward does not escape it. (mongo:8.0.4 reportedly runs on newer kernels, but that is an older release predating the bad TCMalloc bump, not a forward fix.)

A community-confirmed workaround omitted from the official docs: setting GLIBC_TUNABLES=glibc.pthread.rseq=0 in the container environment lets mongod 8.x run on kernel 6.19+.

Action items

  • Track upstream for a MongoDB release with patched TCMalloc; relax mongodb_unsupported_kernel once verified.
  • Consider exposing the GLIBC_TUNABLES=glibc.pthread.rseq=0 workaround as an opt-in role variable.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions