rpm-4.5-69.i686 crash on Qt upgrade

Jeffrey Johnson n3npq at me.com
Mon Oct 1 19:33:44 CEST 2012


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: Expected size:      1027293 = lead(96)+sigs(268)+pad(4)+data(1026925)
> D:   Actual size:      1027293
> D: QtXmlPatterns-4.8.3-6: Header V4 DSA signature: NOKEY, key ID e4f1bc2d
> D:   install: QtXmlPatterns-4.8.3-6 has 6 files, test = 0
>   6:QtXmlPatterns          
> D: ========== Directories not explicitly included in package:
> D:          0 /usr/bin/
> D:          1 /usr/lib64/
> D:          2 /usr/lib64/qt4/bin/
> D: ==========
> D: fini      120755  1 (   0,   0)          37 /usr/bin/xmlpatternsvalidator;5049aab4
> D: fini      120755  1 (   0,   0)          25 /usr/lib64/libQtXmlPatterns.so.4.8;5049aab4
> D: fini      100755  1 (   0,   0)     4448144 /usr/lib64/libQtXmlPatterns.so.4.8.3;5049aab4
> ########################################### [100%]
> D: fini      100755  1 (   0,   0)       65424 /usr/lib64/qt4/bin/xmlpatterns;5049aab4
> D: fini      100755  1 (   0,   0)       12000 /usr/lib64/qt4/bin/xmlpatternsvalidator;5049aab4
> LZDIO:     553 reads,  4526496 total bytes in 0.094108 secs
> D:   +++ /var/cache/hrmib/QtXmlPatterns-4.8.3-6.x86_64
> D:   +++ h#    1751 Header V4 DSA signature: NOKEY, key ID e4f1bc2d
> D: adding "QtXmlPatterns" to Name index.
> D: adding 6 entries to Basenames index.
> D: adding "X11/Libraries" to Group index.
> D: adding 20 entries to Requirename index.
> D: adding 5 entries to Providename index.
> D: adding 3 entries to Dirnames index.
> D: adding 20 entries to Requireversion index.
> D: adding 5 entries to Provideversion index.
> D: adding 1 entries to Installtid index.
> D: adding 1 entries to Sigmd5 index.
> 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.

73 de Jeff
> -- 
> 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