https://bugs.openldap.org/show_bug.cgi?id=10389
Issue ID: 10389 Summary: mdb_opinfo_get: Assertion `!rc' failed. And data got lost. Product: OpenLDAP Version: 2.6.9 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: backends Assignee: bugs@openldap.org Reporter: 3049720393@qq.com Target Milestone: ---
Hi All, Don't know whether this problem is related to this bug or not, but want to share it here as we still do not know the reason ;)
We're using version 2.6.9 now and started up by docker container. It works very well when installing and starting it on a server instance.
But recently, we try to create it on Azure Container Apps service (which is a service supporting to start docker containers), but found out that when two openldap containers(openldap processes) run at the same time with same data volume mounted, well, one is normally started, and another one is looping to try to start but always failed. The failed one shows errors:
``` mdb_db_open: database "dc=xxx,dc=exmple,dc=com" cannot be opened: Resource temporarily unavailable (11). Restore from backup! backend_startup_one (type=mdb, suffix="dc=xxx,dc=exmple,dc=com"): bi_db_open failed! (11) ```
I think this is OK, because the started one is occupying the resources. And the started up one is working well for some time, BUT suddenly at some point, it went down to exit with the following error messages:
``` slapd: id2entry.c:828: mdb_opinfo_get: Assertion `!rc' failed. /usr/local/bin/entrypoint.sh: line 160: 50 Aborted (core dumped) slapd -d 32768 -u openldap -g openldap -F /etc/ldap/slapd.d ```
And as the previous normal one is exit, the other one can start up normally. So we bash into it and ran `ldapsearch` command and found out that some of the people entries were gone!!! But until now we still do not know the reason...
try to get some help here ;) thanks.
https://bugs.openldap.org/show_bug.cgi?id=10389
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Quanah Gibson-Mount quanah@openldap.org --- Hi,
two openldap containers(openldap processes) run at the same time with same data volume mounted,
Such a config is explicitly unsupported. http://www.lmdb.tech/doc/
"Do not use LMDB databases on remote filesystems, even between processes on the same host. This breaks flock() on some OSes, possibly memory map sync, and certainly sync between programs on different hosts."
Running from different containers breaks sync, as if running from different hosts. As such you're likely to have corrupted the database.
https://bugs.openldap.org/show_bug.cgi?id=10389
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Status|RESOLVED |VERIFIED