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

Re: (ITS#4180) slapd (back-sql) hangs/segfaults on SASL bind



On 19 Nov 2005 at 0:58, Pierangelo Masarati wrote:

> On Fri, 2005-11-18 at 21:45 +0000, Nels@maei.ca wrote:

> > 545             struct propval auxvals[3] = { 0 };
> > 544             struct propctx *props = sasl_auxprop_getctx( sconn );
> > 545             struct propval auxvals[3] = { 0 };
> > 551             *out_len = 0;
> > 556                     in ? in : "<empty>");
> > 561             if ( inlen > out_max )
> > 569             if ( !conn->c_sasl_bindop ||
> > 573             prop_getnames( props, slap_propnames, auxvals );
> > 574             if ( !auxvals[0].name )
> > 577             if ( flags & SASL_CU_AUTHID )
> > 583             if ( !auxvals[PROP_CONN].values ) {
> > 577             if ( flags & SASL_CU_AUTHID )
> > 583             if ( !auxvals[PROP_CONN].values ) {
> > 590             if ( auxvals[which].values )
> 
> ^^^ This shouldn't have happened.  auxvals[which].values here contains
> garbage instead of 0, although we reset it at 545 before calling
> prop_getnames() at 573.  Could you make sure, e.g. by executing
> 
> (gdb) p auxvals
> 
> before calling prop_getnames(), that all the fields are initially zero,
> and see how they get filled by that call?

Hm... it seems to be working opposite to expectations, then.  Here's 
auxvals immediately after it's reset:

545             struct propval auxvals[3] = { 0 };
(gdb) p auxvals
$13 = {{name = 0x9af7de8 "Ðz¯\t", values = 0x9af7de8, nvalues = 0, 
    valsize = 162274273}, {name = 0x4 <Address 0x4 out of bounds>, 
    values = 0x8162cb0, nvalues = 1929438584, valsize = 135253975}, {
    name = 0x9af7deb "\t", values = 0x9af7de8, nvalues = 1, 
    valsize = 162495976}}
(gdb) p auxvals[3]
$14 = {name = 0x9a2a190 "sql", values = 0x80fcd50, nvalues = 
162271696, valsize = 135677768}

And after prop_getnames():

573             prop_getnames( props, slap_propnames, auxvals );
(gdb) p auxvals
$15 = {{name = 0x0, values = 0x0, nvalues = 0, valsize = 0}, {name = 
    0x0, values = 0x0, nvalues = 0, valsize = 0}, {name = 0x0, 
    values = 0x0, nvalues = 0, valsize = 0}}
574             if ( !auxvals[0].name )
(gdb) p auxvals
$3 = {{name = 0x811e3cf "*slapConn", values = 0x901a1b4, nvalues = 1, 
    valsize = 4}, {name = 0x811e3d9 "*slapAuthcDN", values = 
0x901a1bc, 
    nvalues = 1, valsize = 8}, {name = 0x811e3e6 "*slapAuthzDN", 
    values = 0x901a1d4, nvalues = 1, valsize = 6}}

> Note, I suspect from your prints that you optimized the build.  Could
> you try building with -O0, just in case?

Sorry; just got back from a meeting and now I have to leave, so I 
don't have time to rebuild right now.  

All I did was configure; make depend; make, make install, though.  Is 
it optimized by default?  I'll check when I get a chance...

----
Nels Lindquist <*>
Information Systems Manager
Morningstar Air Express Inc.