https://bugs.openldap.org/show_bug.cgi?id=9338
Issue ID: 9338 Summary: slapd write waiter doesn't resume pending ops Product: OpenLDAP Version: 2.5 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: hyc@openldap.org Target Milestone: ---
If a socket output buffer fills up (e.g. because the client is not reading responses fast enough) slapd will queue up any newly received operations on that connection and defer their execution till later. In the new write waiter code in master/2.5, after the socket becomes writable again the pending ops are not getting rescheduled for execution because of a missing call to connection_write(). As a result, a client waiting for these ops on that connection to finish will be hung forever.
This bug impacts the syncrepl consumer in delta-sync mode if it loses sync and has to fallback to Refresh mode, and its connection was backlogged on the provider side. In the fallback case the consumer sends an Abandon for the current search and issues a new Refresh search, but if the socket was blocked on the provider side the new search won't execute.
A fix for the write waiter is ready, and also the consumer will be patched to simply close the connection and open a new one on its fallback, to avoid running into this problem.