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

Re: syncrepl consumer locks up (ITS#3263)



On Tuesday 03 August 2004 21:46, Karsten Künne wrote:
> On Tuesday 03 August 2004 15:49, Jong-Hyuk wrote:
> > Thanks for the info. This level of detail is really helping in locating
> > the problem.
> > Looks like another interaction with the group ACL. It segfaulted while it
> > tried to read the group entry.
> > I can't tell how far bdb_entry_get proceeded before he died, though. Can
> > you locate wehre it faulted within bdb_entry_get ?
> > - Jong-Hyuk
>
> Hmm, I looked a bit through the sources. The culprit seems to be somewhere
> at around line 386 in back-bdb/id2entry.c where I find:
>
>                 if ( slapMode == SLAP_SERVER_MODE ) {
>                         *ent = e;
>                         /* big drag. we need a place to store a read lock
> so wecan
>                          * release it later??
>                          */
>                         if ( op && !boi ) {
>                                 boi = op->o_tmpcalloc(1,sizeof(struct
> bdb_op_info),op->o_tmpmemctx);
>                                 boi->boi_lock = lock;
>                                 op->o_private = boi;
>                         }
>
>
> Here the boi_lock is initialized but not boi_bdb and later on slapd
> stumbles over it at line 268 in id2entry.c:
>
> if( boi != NULL && op->o_bd->be_private == boi->boi_bdb->be_private ) ...
>
> I'll try to initialize boi_bdb and see whether it changes anything.
>

O.k., after the following small patch the consumer starts without SEGV and 
it's still running! Here is the patch:

--- ./servers/slapd/back-bdb/id2entry.c.orig    Tue Aug  3 21:46:34 2004
+++ ./servers/slapd/back-bdb/id2entry.c Tue Aug  3 21:49:57 2004
@@ -386,6 +386,7 @@
                        if ( op && !boi ) {
                                boi = op->o_tmpcalloc(1,sizeof(struct 
bdb_op_info),op->o_tmpmemctx);
                                boi->boi_lock = lock;
+                               boi->boi_bdb = op->o_bd;
                                op->o_private = boi;
                        }

Somebody should check whether this is the right thing to do as I'm not very 
familiar with the code in this area.

The second crash fixed today, not a bad day :-). Now it's time to go home.


Karsten.
-- 
Breast Feeding should not be attempted by fathers with hairy chests,
since they can make the baby sneeze and give it wind.
		-- Mike Harding, "The Armchair Anarchist's Almanac"