https://bugs.openldap.org/show_bug.cgi?id=10095
--- Comment #1 from Howard Chu hyc@openldap.org --- We had a discussion of this problem before, but I don't recall where. My suggestion was to immediately attempt to change the readlock to a writelock after acquiring the readlock. (Again, with no wait.) The only objection I recall was that this may significantly delay env open operations, but I don't think that's true, if we use F_SETLK and not F_SETLKW.