Hello dear Percona team,
Recently one of our MongoDB deployments failed with the “Invariant failure“ error:
{"t":{"$date":"2025-09-25T14:00:02.068-04:00"},"s":"F", "c":"ASSERT", "id":23079, "ctx":"conn125810","msg":"Invariant failure","attr":{"expr":"!it->second.failed","file":"src/mongo/db/ldap/ldap_manager_impl.cpp","line":338}}
{"t":{"$date":"2025-09-25T14:00:02.068-04:00"},"s":"F", "c":"ASSERT", "id":23080, "ctx":"conn125810","msg":"\n\n***aborting after invariant() failure\n\n"}
{"t":{"$date":"2025-09-25T14:00:02.068-04:00"},"s":"F", "c":"CONTROL", "id":6384300, "ctx":"conn125810","msg":"Writing fatal message","attr":{"message":"\n"}}
{"t":{"$date":"2025-09-25T14:00:02.068-04:00"},"s":"F", "c":"CONTROL", "id":6384300, "ctx":"conn125810","msg":"Writing fatal message","attr":{"message":"Got signal: 6 (Aborted).\n"}}
[...]
{"t":{"$date":"2025-09-25T14:00:02.156-04:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"conn125810","msg":"Frame","attr":{"frame":{"a":"557E170D2667","b":"557E0F0D4000","o":"7FFE667","s":"_ZN5mongo11DBException13traceIfNeededERKS0_","C":"mongo::DBException::traceIfNeeded(mongo::DBException const&)","s+":"207"}}}
{"t":{"$date":"2025-09-25T14:00:02.156-04:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"conn125810","msg":"Frame","attr":{"frame":{"a":"557E170D3D31","b":"557E0F0D4000","o":"7FFFD31","s":"_ZN5mongo15invariantFailedEPKcS1_j","C":"mongo::invariantFailed(char const*, char const*, unsigned int)","s+":"15F"}}}
This happened twice in a row, at the exact same time.
As per the error message, this seems to be caused by “ldap_manager_impl.cpp“ and it looks like the LDAP module which happens to be used by here.
We did some research but no relevant/similar issues could be found.
MongoDB version:
db version v7.0.8-5
OS version
Ubuntu 22.04 LTS
Do you have any idea on what may have caused this and if there are ways to avoid?