Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: current userland slapd no response



On Wednesday 17 September 2008 11:04:42 matthew sporleder wrote:
> On 9/16/08, Sarton O'Brien <bsd-xen%roguewrt.org@localhost> wrote:
> >  Also, I forgot to mention that I could only stop slapd with 'kill -9'.
> >
> >  Now there is no load at all ... a simple ldapsearch returns:
> >
> >  # /usr/pkg/bin/ldapsearch
> >  ldap_sasl_interactive_bind_s: No such attribute (16)
>
> Are you using SASL?  If not try ldapsearch -x.

Oops, no, not in this situation. But I did try with -x when there was load and 
it did not return.

Trying now, it returns half the database then locks after cn=root. Subsequent 
searches just don't return and provide no data.

Ctrl-c on slapd results in 'waiting for 1 thread' and locks.

> >  daemon: activity on 1 descriptor
> >  daemon: activity on: 11r
> >  daemon: read activity on 11
>
> ...
>
> >  ldap_read: want=8 error=Resource temporarily unavailable
> >  daemon: activity on 1 descriptor
> >  daemon: waked
> >
> >  connection_get(11)
> >  connection_get(11): got connid=0
> >  connection_read(11): checking for input on id=0
> >  ber_get_next
> >  ldap_read: want=8, got=0
> >
> >  ber_get_next on fd 11 failed errno=0 (Undefined error: 0)
> >  connection_read(11): input error=-2 id=0, closing.
> >
> >  conn=0 fd=11 closed (connection lost)
>
> These are the keys, I think.  Can you try this again and identify fd
> 11?  I have a feeling it's the bdb file but it would be good to know
> for sure if it's an index, data file, etc.  (can you make sure db_stat
> is okay on all of your files?)

Just to note, I've recovered this database a few times now ... slapcatted out 
and back in to others etc. I've even tried clearing out and starting fresh.

Does this help? If I've excluded a relevant part let me know.

  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
                                                                          
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
                                                                          
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
                                                                          
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
                                                                          
daemon: activity on 1 descriptor                                                
                                                                          
daemon: activity on: 12r                                                        
                                                                          
daemon: read activity on 12                                                     
                                                                          
daemon: select: listen=7 active_threads=0 tvp=NULL                              
                                                                          
daemon: select: listen=8 active_threads=0 tvp=NULL                              
                                                                          
connection_get(12)                                                              
                                                                          
connection_get(12): got connid=0                                                
                                                                          
connection_read(12): checking for input on id=0                                 
                                                                          
ber_get_next                                                                    
                                                                          
ldap_read: want=8, got=0                                                        
                                                                          

ber_get_next on fd 12 failed errno=0 (Undefined error: 0)
connection_read(12): input error=-2 id=0, closing.       
connection_closing: readying conn=0 sd=12 for close
daemon: activity on 1 descriptor                         
daemon: waked                                            
daemon: select: listen=7 active_threads=0 tvp=NULL       
daemon: select: listen=8 active_threads=0 tvp=NULL       
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      2 slapd    select(0xd, 0x7f7fe77ff930, 0, 0, 0) = 1
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x21) = 33   
       "daemon: activity on 1 descriptor\n"                    
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x14) = 20   
       "daemon: activity on:"                                  
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x4) = 4     
       " 12r"                                                  
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x1) = 1     
       "\n"                                                    
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x1c) = 28   
       "daemon: read activity on 12\n"                         
  1308      2 slapd    mmap(0, 0x400000, 0x3, 0x16001002, 0xffffffff, 0, 0) = 
0x7f7fe5c00000
  1308      2 slapd    mprotect(0x7f7fe5c01000, 0x1000, 0) = 0                  
            
  1308      2 slapd    _lwp_create(0x7f7fe5c00a88, 0x40, 0x7f7fe5c00168) = 0    
            
  1308      2 slapd    gettimeofday(0x7f7fe77ff4e0, 0) = 0                      
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x33) = 51                    
            
       "daemon: select: listen=7 active_threads=0 tvp=NULL\n"                   
            
  1308      4 slapd    _lwp_ctl(0x1, 0x7f7fe5c00208) = 0                        
            
  1308      2 slapd    _lwp_unpark(0x4, 0x7f7ffc900070) = 0                     
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x33) = 51                    
            
       "daemon: select: listen=8 active_threads=0 tvp=NULL\n"                   
            
  1308      4 slapd    _lwp_park(0, 0, 0x7f7ffc900070, 0x7f7ffc900070) = 0      
            
  1308      2 slapd    _lwp_unpark(0x4, 0x7f7ffc900070) = 0                     
            
  1308      4 slapd    _lwp_park(0, 0, 0x7f7ffc900070, 0x7f7ffc900070) = 0      
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe6e0, 0x13) = 19                    
            
       "connection_get(12)\n"                                                   
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe6e0, 0x21) = 33                    
            
       "connection_get(12): got connid=0\n"                                     
            
  1308      4 slapd    gettimeofday(0x7f7fe5fff7a0, 0) = 0                      
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe700, 0x30) = 48                    
            
       "connection_read(12): checking for input on id=0\n"                      
            
  1308      4 slapd    write(0x2, 0x7f7fe5fff280, 0xd) = 13                     
            
       "ber_get_next\n"                                                         
            
  1308      4 slapd    read(0xc, 0x7f7ffc14461f, 0x8) = 0                       
            
       ""                                                                       
            
  1308      4 slapd    write(0x2, 0x7f7fe5fff1a0, 0x19) = 25                    
            
       "ldap_read: want=8, got=0\n"                                             
            
  1308      4 slapd    write(0x2, 0x7f7fe5fff5d0, 0x1) = 1                      
            
       "\n"                                                                     
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe700, 0x3a) = 58                    
            
       "ber_get_next on fd 12 failed errno=0 (Undefined error: 0)\n"            
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe700, 0x33) = 51                    
            
       "connection_read(12): input error=-2 id=0, closing.\n"                   
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe6e0, 0x34) = 52                    
            
       "connection_closing: readying conn=0 sd=12 for close\n"                  
            
  1308      4 slapd    write(0x6, 0x5548a9, 0x1)   = 1                          
            
       "0"                                                                      
            
  1308      2 slapd    select(0xd, 0x7f7fe77ff930, 0, 0, 0) = 1                 
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x21) = 33                    
            
       "daemon: activity on 1 descriptor\n"                                     
            
  1308      2 slapd    read(0x5, 0x7f7fe77ff530, 0x400) = 1                     
            
       "0"                                                                      
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0xe) = 14                     
            
       "daemon: waked\n"                                                        
            
  1308      2 slapd    gettimeofday(0x7f7fe77ff4e0, 0) = 0                      
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x33) = 51                    
            
       "daemon: select: listen=7 active_threads=0 tvp=NULL\n"                   
            
  1308      2 slapd    write(0x2, 0x7f7fe77fe420, 0x33) = 51                    
            
       "daemon: select: listen=8 active_threads=0 tvp=NULL\n"                   
            
connection_close: deferring conn=0 sd=12                                        
            
  1308      4 slapd    write(0x2, 0x7f7fe5ffe6b0, 0x29) = 41                    
            
       "connection_close: deferring conn=0 sd=12\n"                             
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0                   
            
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
  1308      3 slapd    select(0, 0, 0, 0, 0x7f7fe727ecb0) = 0
^Cdaemon: shutdown requested and initiated.

daemon: closing 7
daemon: closing 8
connection_close: deferring conn=0 sd=12
slapd shutdown: waiting for 1 threads to terminate

> >  Undefined error?
> >
> >  But now I can actually kill slapd. I caught a dump yesterday but it may
> > not be relevant as I hadn't set my stacksize to 4096 as required on
> > amd64.
>
> If it's any help:
>    1443       tag = ber_get_next( conn->c_sb, &len, conn->c_currentber );
>    1444       if ( tag != LDAP_TAG_MESSAGE ) {
>    1445               int err = sock_errno();
>    1446
>    1447               if ( err != EWOULDBLOCK && err != EAGAIN ) {
>    1448                       /* log, close and send error */
>    1449                       Debug( LDAP_DEBUG_TRACE,
>    1450                               "ber_get_next on fd %d failed errno=%d 
> (%s)\n",
>    1451                       conn->c_sd, err, sock_errstr(err) );
>    1452                       ber_free( conn->c_currentber, 1 );
>    1453                       conn->c_currentber = NULL;
>    1454
>    1455                       return -2;
>    1456               }
>    1457               return 1;
>    1458       }

It's not any help but I appreciate the information a lot. It's only a matter 
of time before I do understand what this means :) ... tbh, I do understand to 
some extent, the comment helps. All in all, doesn't this just mean it was an 
error that was unaccounted for?

> But you really need to figure out why err is getting set to 0 and -2.

OK ... I think I've hit my debugging limit :)

Thanks for taking the time to help.

Sarton


Home | Main Index | Thread Index | Old Index