[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
slapd abort in (ITS#1655)
Full_Name: Alfred Keller
Version: 2.0.23
OS: Win 2000
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.134.131.162)
When a slapd client opens and closes connections to slapd in short intervals,
then slapd frequently aborts at the following code line:
ber_sockbuf_ctrl( Sockbuf *sb, int opt, void *arg )
{
Sockbuf_IO_Desc *p;
int ret = 0;
assert( sb != NULL ); <<<<<<<<<<<<<<< here
assert( SOCKBUF_VALID( sb ) );
--- snip ----
The calling function is:
static Connection* connection_get( ber_socket_t s )
{
....
for(i=0; i<dtblsize; i++) {
ber_sockbuf_ctrl( connections[i].c_sb,
LBER_SB_OPT_GET_FD, &sd ); <<<<<<<< called here
if( connections[i].c_struct_state == SLAP_C_UNINITIALIZED ) {
assert( connections[i].c_conn_state == SLAP_C_INVALID );
assert( connections[i].c_sb == 0 ); <<<<<<<< look here !
break;
}
----- snip -----
Something is wrong here because at 'look here' you see that under some
conditions connections[i].c_cb is expected to be 0, but in the call to
ber_sockbuf_ctrl a few lines above the value of connections[i].c_cb may never be
0??? (assert in ber_sockbuf_ctrl).
By the way, our application runs fine when we call ber_sockbuf_ctrl *after* the
'if'-block in function connection_get. Be we can't say if this is the correct
way to fix the problem.