[Date Prev][Date Next]
Re: (ITS#6585) close is called from dap_unbind_s with fd = -1
Thanks a lot for looking into this issue.
On Thu, Jul 22, 2010 at 3:07 AM, Howard Chu <firstname.lastname@example.org> wrote:
> email@example.com wrote:
>> Full_Name: Asif Iqbal Desai
>> Version: 2.4.16
>> OS: Solaris 10
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (184.108.40.206)
>> This is a consulation bug for clarification on close() being called from
>> ldap_unbind_s with fd =3D 1.
>> The application uses ldap client apis for user authentication.
>> We recently upgraded to use OpenLDAP version 2.4.16 and are getting an
>> unexpected AIO error issue when ldap user authentication is enabled.
>> Investigating further revealed that from ldap_unbind_s ( close(-1) is
>> called. However the close function of solaris libaio does a special
>> when fd< =A00 which causes AIO errors.
>> The application needs solaris aio support and hence cannot link libc
>> Is there any specific reason for close being called with fd =3D -1 from
>> This issue didnot exist with OpenLDAP 2.3.27.
> I've checked 2.3.43 and 2.4.23; in both cases ber_int_sb_close() is being
> called twice on the same sockbuf. I suppose that might be considered a bu=
> but certainly the behavior has not changed between 2.3 and 2.4.
>> Following is the stacktrace:
>> =A0  _libaio_close(0xffffffffffffffff, 0x2, 0x1, 0xffffffff7f300200, =
>> at 0xffffffff7f406a64
>> =A0  sb_stream_close(0x100151d80, 0x0, 0x0, 0xffffffff7f300200, 0x0,
>> 0x0), at
>> =A0  ber_int_sb_close(0x100151d00, 0x0, 0x0, 0xffffffff7f300200, 0x0,
>> 0x0), at
>> =A0  ber_sockbuf_free(0x100151d00, 0x1001497d0, 0x1, 0x1,
>> 0xd), at 0xffffffff7d21cebc
>> =A0  ldap_ld_free(0x100149520, 0x1, 0x0, 0x0, 0x100117020, 0xdc3), at
>> =A0  ldap_unbind_ext(0x100149520, 0x0, 0x0, 0x1001219e0, 0x1001219f8,
>> 0x100121a00), at 0xffffffff7d26a048
>> =A0  ldap_unbind_s(0x100149520, 0x1001471d0, 0x100149520,
>> 0x0, 0x100117728), at 0xffffffff7d26a55c
>> Thanks in Advance,
>> Asif Iqbal Desai
> =A0-- Howard Chu
> =A0CTO, Symas Corp. =A0 =A0 =A0 =A0 =A0 http://www.symas.com
> =A0Director, Highland Sun =A0 =A0 http://highlandsun.com/hyc/
> =A0Chief Architect, OpenLDAP =A0http://www.openldap.org/project/