rpm-4.5-69.i686 crash on Qt upgrade

Jan Rękorajski baggins at pld-linux.org
Mon Oct 1 22:55:40 CEST 2012


On Mon, 01 Oct 2012, Jeffrey Johnson wrote:

> 
> On Oct 1, 2012, at 6:47 AM, Jan Rękorajski wrote:
> 
> > On Sun, 30 Sep 2012, Jeffrey Johnson wrote:
> > 
> >> 
> >> On Sep 30, 2012, at 6:08 AM, Elan Ruusamäe wrote:
> >> 
> >>> decided to write, as mmazur said in irc that for him crash occoured also in Qt upgrade
> >>> 
> >>> my random guess is that rpm45 does not like something that rpm5 put into .rpm package,
> >>> as haven't seen rpm45 crashing for a long time.
> >>> 
> >> 
> >> As good a gas as any: wanna bet? ;-)
> >> 
> >> Show me -v -v output and I can likely guess what the problem is.
> > 
> > Here you go:
> > 
> > D: ========== +++ QtXmlPatterns-4.8.3-6 x86_64-linux 0x2
[...]
> > D: adding "c16b5e5e3d026f4d5a8628ffcbf09f094ef22f4d" to Sha1header index.
> > rpm: rpmdb.c:3429: rpmdbAdd: Assertion `(dlen & 1) == 0' failed.
> > 
> 
> OK.
> 
> Here is the code containing the assertion failure (in rpm-4.5, 2 occurrences):
>                     if (dbi->dbi_rpmtag == RPMTAG_FILEDIGESTS) {
>                         const char * s = rpmvals[i];
>                         size_t dlen = strlen(s);
>                         byte * t;
> assert((dlen & 1) == 0);
>                         dlen /= 2;
>                         bin = t = xcalloc(1, dlen);
>                         for (j = 0; j < dlen; j++, t++, s += 2)
>                             *t = (nibble(s[0]) << 4) | nibble(s[1]);
>                         key->data = bin;
>                         key->size = dlen;
>                         /*@switchbreak@*/ break;
>                     }
> 
> The assertion is a sanity check on the number of hex digits in RPMTAG_FILEDIGESTS
> strings (which will always be even).
> 
> What digest is in use for file content? The digest  algorithm is configurable in rpm-5.x, and
> is more likely to be SHA256/SHA1 than MD5 these days.

Both rpm 4.5 and now rpm 5.4 use MD5 as file digest algo.

And ripping out filemd5 index is quite pointless, as the problem is the
inability to install package build with rpm5 on a system with rpm 4.5,
so the real fix is "upgrade to rpm5". But it would be good to know what
is the cause of that bug to not break things before upgrade.

-- 
Jan Rękorajski                                 | PLD/Linux
SysAdm                                         | http://www.pld-linux.org/
baggins<at>mimuw.edu.pl
baggins<at>pld-linux.org


More information about the pld-devel-en mailing list