[Issue 9278] liblmdb: robust mutexes should not be unmapped
https://bugs.openldap.org/show_bug.cgi?id=9278 --- Comment #13 from Howard Chu --- Must also note - there would still be another race condition, regardless: When the first process destroys the mutexes, and still has the lockfile open, another process attempting to open the env during that time will see that the lockfile is locked, which it would take to mean all of the lockfile contents are still valid. Meanwhile the first process unmaps the region, and the kernel wipes out the underlying mutex structures. Then the first process closes the lockfile which releases the lock, the later process acquires the readlock and tries to use the lockfile as-is but its mutexes are no longer valid. This race would occur regardless of what libc / libthr does since the kernel automatically GCs the underlying mutex structures as soon as the region is unmapped. It could be avoided if the kernel additionally waits to cleanup until there are no open descriptors on the file. -- You are receiving this mail because: You are on the CC list for the issue.
[Issue 10095] Race condition causing corruption of mutexes when closing the database
https://bugs.openldap.org/show_bug.cgi?id=10095 Howard Chu changed: What|Removed |Added See Also||https://bugs.openldap.org/s ||how_bug.cgi?id=9278 -- You are receiving this mail because: You are on the CC list for the issue.
[Issue 9278] liblmdb: robust mutexes should not be unmapped
https://bugs.openldap.org/show_bug.cgi?id=9278 Howard Chu changed: What|Removed |Added See Also||https://bugs.openldap.org/s ||how_bug.cgi?id=10095 Resolution|FIXED |--- Ever confirmed|0 |1 Status|VERIFIED|CONFIRMED --- Comment #12 from Howard Chu --- We're going to revert this patch due to all the new race conditions it introduces (see other ITSs noted above). No other platforms have the problem reported here, so we must consider it a bug in FreeBSD that munmapping a mutex doesn't automatically perform all of the necessary libc cleanup itself. -- You are receiving this mail because: You are on the CC list for the issue.