[Date Prev][Date Next]
Re: send_search_entry aborts b/c ber_flush fails with errno=0 (ITS#1891)
>However, the code should never try to flush an empty buffer; every code
>path that drops into result.c:send_ldap_ber() (which invokes ber_flush)
>have filled the ber structure with data.
I agree completley, although this ended up not being the cause of our
>There are no references to EWOULDBLOCK in ber_flush, so I have ignored
>of your suggested fixes.
I'm not sure what you are referring to here. To clarify, the problem we
were seeing with the openldap 2.0.14 currently used by Globus is that for
reasons we have not yet determined er_int_sb_write() was failing but with
errno=0. eg in syslog:
slapd: ber_flush failed errno=0 reason="Success"
slapd: send_ldap_response: ber write failed
The error check in ber_flush results in the errno=0 being considered a
fatal error. Effectively, the default behavior when ber_flush fails is to
the abort unless errno is either EWOULDBLOCK or EAGAIN. I still have to dig
deeper to find out why the lower level sb_write() is failing but returning
a zero error code, so perhaps our 'fix' is really more of a workaround...
Thanks for your response. I'll forward the changes you are making to the
Openldap CVS to the Globus folks.
Gareth S. Bestor, PhD.
IBM Poughkeepsie UNIX Development Lab
Bldg. 414, M/S P963
2455 South Road, Poughkeepsie, NY 12601-5400
(845) 433-6289, Tieline 293-6289, Fax (845) 433-8363
Howard Chu <openldap-its@OpenLDAP.org> on 06/17/2002 07:12:24 PM
To: Gareth S Bestor/Poughkeepsie/IBM@IBMUS
Subject: Re: send_search_entry aborts b/c ber_flush fails with errno=0
I have fixed the debug message in slapd/result.c:send_search_entry() and
the while loop in liblber/io.c:ber_flush(). The changes are committed to
HEAD. However, the code should never try to flush an empty buffer; every
path that drops into result.c:send_ldap_ber() (which invokes ber_flush)
have filled the ber structure with data. There is likely something else
There are no references to EWOULDBLOCK in ber_flush, so I have ignored that
of your suggested fixes.