rpm-5.4.10-22.i686 loops forever when installing ntpd-4.2.6p5-5.i686.rpm

Jeffrey Johnson n3npq at me.com
Fri Nov 30 23:32:15 CET 2012


On Nov 30, 2012, at 3:47 PM, Jan Rękorajski <baggins at pld-linux.org> wrote:

>> 
>> If this is the real problem, then the fix for infinite looping
>> has little to do with namespaces at all.
>> 
>> Yes: the iterator loop index on dependency sets is global.
>> 
>> Which means that if something decrements the iterator index
>> lower down, then the high level will continuously repeat.
> 
> Thanks for clarification, I was thinking I must be seeing things ;)
> 
>> Either the low level search has to save/restore loop indexes,
>> or the high level loop needs its own copy.
> 
> The real fix for the loop bug below.
> 

Its a bit cleaner if you change the top-side to use a
private loop index.

FWIW: your patch is what RPM used to do, and was
removed while looking at OpenMP annotated dependency
solving with helgrind.

I.e. I'm more interested in getting a proper iterator
that is thread safe than sick hack-o-rounds these days.

> BTW, did you look into the problem with triggers arguments?
> 

Nope. I have yet to be convinced of what the root
cause is: all you have been telling me is that
	RPM5 is buggy
and I'm pretty sure the final solution has yet to be seen.

73 de Jeff

> 
> --- rpm-5.4.10/lib/rpmal.c~	2012-11-30 13:20:59.087249280 +0100
> +++ rpm-5.4.10/lib/rpmal.c	2012-11-30 21:20:20.856611761 +0100
> @@ -403,6 +403,7 @@
>     const char * KName;
>     availablePackage alp;
>     int rc;
> +    int savedIx;
> 
>     if (keyp) *keyp = RPMAL_NOMATCH;
> 
> @@ -450,10 +451,12 @@
> 	if (alp->provides != NULL)	/* XXX can't happen */
> 	switch (match->type) {
> 	case IET_PROVIDES:
> +	    savedIx = rpmdsIx(alp->provides);
> 	    /* XXX single step on rpmdsNext to regenerate DNEVR string */
> 	    (void) rpmdsSetIx(alp->provides, match->entryIx - 1);
> 	    if (rpmdsNext(alp->provides) >= 0)
> 		rc = rpmdsCompare(alp->provides, ds);
> +	    (void) rpmdsSetIx(alp->provides, savedIx);
> 
> 	    if (rc)
> 		rpmdsNotify(ds, _("(added provide)"), 0);
> 
> 
> -- 
> Jan Rękorajski                                 | PLD/Linux
> SysAdm                                         | http://www.pld-linux.org/
> baggins<at>mimuw.edu.pl
> baggins<at>pld-linux.org
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list