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

(ITS#3542) daemon: select failed (22): invalid argument



Full_Name: Robert Roll
Version: openldap 2.2.23
OS: solaris 9 (on sparc)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (155.101.224.85)


        I am encountering the following:

                daemon: select failed (22): Invalid argument

        This only seemed to crop up when I was attempting a syncrepl.
However, after seeing where its occurring, it's not clear to me that it
might not be able to occur at other times. 

Config:
        Sparc Solaris 9
        openldap 2.2.23
        db 4.3.27

        Below is some output demonstrating the problem. Note, I did add
some debug print statements to ../servers/slapd/daemon.c . I have
annotated them below. It appears that a large negative seconds is passed
in the time structure to select. That is what is causing the invalid
argument. 

        I managed to "fix" this for now, by changing an equals
comparison to a less than or equals. I didn't explore the logic real
close, so I am not sure if this is the best thing to do or not.

        I have also included a diff, showing my debug print statements,
along with the comparison change I made to get around my immediate
problem.

BTW -- 

         I have also encountered a number of what seem to be already
reported bugs about the syncrepl provider server terminating after an
improper termination of the client machine.

        Maybe, it is documented somewhere and I missed it. It made all
the difference in the world to index entryUUID. If this isn't
documented, it really should be. 
         
        I think this syncrepl stuff is pretty cool and I really hope
those working on it can get the bugs worked out. I really appreciate
their efforts ! :)


                                                        Thanks,

                                                        Robert


Robert Roll
University of Utah
OIT (Office of Information Technology)
Robert.Roll@Utah.Edu
(801) 581-7655



ldap_chkResponseList for msgid=-1, all=0
ldap_chkResponseList returns NULL
ldap_int_select
connection_get(11): got connid=0
daemon: added 11r

***DEBUG PRINT***
diff 1, tdelta 1, cat->tv_sec 1108397241, now 1108397240 now/1000 
 1108397

daemon: select: listen=7 active_threads=0 tvp=zero
daemon: select: listen=8 active_threads=0 tvp=zero
daemon: activity on 1 descriptors

***DEBUG PRINT***
diff -1108397241, tdelta 1, cat->tv_sec 0, now 1108397241 now/1000
1108397


daemon: select: listen=7 active_threads=0 tvp=zero
daemon: select: listen=8 active_threads=0 tvp=zero

*** DEBUG PRINT ***
nfds: 12 tv.tv_sec -1108397241, tv.tv_usec 0 tvp->tv_sec -1108397241,
tvp->tv_usec 0

daemon: select failed (22): Invalid argument
daemon: abnormal condition, shutdown initiated.
daemon: closing 7
daemon: closing 8
slapd shutdown: waiting for 1 threads to terminate
=>do_syncrepl
connection_get(11): got connid=0
daemon: removing 11r
ldap_unbind
ldap_free_request (origid 2, msgid 2)
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 11
ldap_free_connection: actually freed
slapd shutdown: initiated
====> bdb_cache_release_all
slapd shutdown: freeing system resources.
slapd stopped.


######## Diff #############3

> diff daemon.c.bak daemon.c
1388c1388,1389
<                       if ( diff == 0 )
---
>                       printf("diff %d, tdelta %d, cat->tv_sec %d, now
%d now/1000 %d\n", diff, tdelta, cat->tv_sec, now, now/1000);
>                       if ( diff <= 0 )
1437a1439,1440
> 
>                                 printf("nfds: %d tv.tv_sec %d,
tv.tv_usec %d tvp->tv_sec %d, tvp->tv_usec %d\n", nfds, tv.tv_sec,
tv.tv_usec,  tvp->tv_sec, tvp->tv_usec);
>