Howard Chu writes:
That's interesting. That would require receiving a Hangup event on a descriptor we've already removed from epoll's event list. How can that be?
OS bug? Race condition? Valgrind bug, since it so far will only happen under Valgrind?
Have you seen this with CONNS debug messages enabled?
Full testrun dir in http://folk.uio.no/hbf/testrun.1.tbz from GRIND=valgrind SLAPD_DEBUG=269 ./run test050 (I've done s/exec/exec $GRIND/ on last 'exec' in servers/slapd/slapd).
Seems to usually be in slapd.2.log. It ends with:
conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=4 text= daemon: activity on 1 descriptor daemon: activity on: 9r daemon: read active on 9 daemon: epoll: listen=7 active_threads=0 tvp=NULL connection_get(9) connection_get(9): got connid=0 connection_read(9): checking for input on id=0 ber_get_next daemon: activity on 1 descriptor daemon: activity on: daemon: hangup on 9 connection_get(9) ber_get_next: tag 0x30 len 5 contents: ber_get_next ber_get_next on fd 9 failed errno=0 (Success) connection_read(9): input error=-2 id=0, closing. connection_closing: readying conn=0 sd=9 for close connection_close: deferring conn=0 sd=9 conn=0 op=2 do_unbind conn=0 op=2 UNBIND connection_get(9): got connid=0 connection_close: deferring conn=0 sd=9 daemon: epoll: listen=7 active_threads=0 tvp=NULL connection_resched: attempting closing conn=0 sd=9 connection_close: conn=0 sd=9 daemon: removing 9 daemon: activity on 2 descriptors daemon: activity on: conn=0 fd=9 closed daemon: hangup on 9 lt-slapd: daemon.c:181: SLAP_EPOLL_SOCK_SET: Assertion `ix >= 0' failed.
$ grep '^conn=' slapd.2.log conn=0 fd=9 ACCEPT from IP=127.0.0.1:46366 (IP=127.0.0.1:9012) conn=0 op=0 BIND dn="cn=config" method=128 conn=0 op=0 BIND dn="cn=config" mech=SIMPLE ssf=0 conn=0 op=0 RESULT tag=97 err=0 text= conn=0 op=1 do_search conn=0 op=1 SRCH base="cn=config" scope=2 deref=0 filter="(objectClass=*)" conn=0 op=1 SRCH attr=* + conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=4 text= conn=0 op=2 do_unbind conn=0 op=2 UNBIND conn=0 fd=9 closed