[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7167) regression, ldap_result() returns -1

jvcelak@redhat.com wrote:
> Full_Name: Jan Vcelak
> Version: 2.4.29
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> There is a possible regression caused by
> 06ec9f1db2bb9dc304a4adcd0d0506203cf9e6b6.
> SSSD's event loop listens for events on a file descriptor retrieved using
> ber_sockbuf_ctrl(sb, LBER_SB_OPT_GET_FD,&ber_fd). If there are some data to be
> read, processing using ldap_result is triggered. (Internally, tevent from Samba
> project is used, which uses epoll.) But sometimes, ldap_result() returns -1
> error code. It seems that the descriptor is marked as readable untimely.
> This problem is not present with OpenLDAP 2.4.26, it appears with all future
> versions. When the mentioned commit is reverted, everything works well.
> Original report in our Bugzilla:
> https://bugzilla.redhat.com/show_bug.cgi?id=771484

Thanks for the report and the detailed investigation, but this sounds to me 
like a kernel bug. We expect select/epoll/whatever to only return that a 
descriptor is readable if it actually is readable. (Gosh, who'dathunkit.) If 
not, then these syscalls are not behaving as documented/designed.
> It was also reported in Ubuntu:
> https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/929888
> And i similar report, hopefully with the same cause:
> https://bugzilla.redhat.com/show_bug.cgi?id=790414

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/