Bug 33419

Summary: rpm-4.0.2-6x: rpmq: header.c:511: headerLoad: Assertion `rdlen == dl' failed
Product: [Retired] Red Hat Linux Reporter: Aleksey Nogin <aleksey>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.cs.cornell.edu/nogin/RPM/untested/rh52/tcl-8.0.3-20an.i386.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-22 16:19:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Patch to fix rpm-2.5.x i18n tag offset/length bug none

Description Aleksey Nogin 2001-03-27 16:49:51 UTC
I've upgraded rpm to rpm-4.0.2-6x and I've recompiled rpm2html under it.
When I try to run rpm2html, it dies (every time) with

rpm2html: header.c:511: headerLoad: Assertion `rdlen == dl' failed.
Abort (core dumped) 

Using strace, I figured out which package "kills" it. If I run

rpm -qp tcl-8.0.3-20an.i386.rpm

then I get the same thing:

rpmq: header.c:511: headerLoad: Assertion `rdlen == dl' failed.
Abort (core dumped)

gdb shows:

(gdb) bt
#0  0x40173d21 in __kill () from /lib/libc.so.6
#1  0x40173996 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x401750b8 in abort () at ../sysdeps/generic/abort.c:88
#3  0x4016dbae in __assert_fail () at assert.c:59
#4  0x4005341d in headerLoad () from /usr/lib/librpm.so.0
#5  0x40053fe9 in headerRead () from /usr/lib/librpm.so.0
#6  0x4005e8c0 in readPackageHeaders () from /usr/lib/librpm.so.0
#7  0x4005eba8 in rpmReadPackageHeader () from /usr/lib/librpm.so.0
#8  0x400620a8 in rpmQueryVerify () from /usr/lib/librpm.so.0
#9  0x40062b47 in rpmQuery () from /usr/lib/librpm.so.0
#10 0x804b697 in poptResetContext ()
#11 0x4016d9cb in __libc_start_main (main=0x804ac14
<poptResetContext+6364>, argc=5,
    argv=0xbffffb64, init=0x8048fd8 <_init>, fini=0x804b8fc <_fini>,
    rtld_fini=0x4000aea0 <_dl_fini>, stack_end=0xbffffb5c)
    at ../sysdeps/generic/libc-start.c:92

The package in question can be obtained from the URL (above). It was
compiled on a RH 5.2 system.

I am running RH6.2+all updates.

Comment 1 Jeff Johnson 2001-03-27 16:57:23 UTC
Have you run --rebuilddb to convert from db1 to db3? Was the conversion
successful?

Otherwise, try erasing and/or reinstalling the tcl package.

Comment 2 Aleksey Nogin 2001-03-27 17:00:20 UTC
Yes, I did --rebuilddb the first thing after I've upgraded rpm.

The package in question is an (old) .i386.rpm file, not something I have
installed.

Comment 3 Aleksey Nogin 2001-03-27 17:02:03 UTC
BTW, I just tried running rpm -Kv on that package and it worked fine - both MD5
and PGP signatures checked OK.

Comment 4 Jeff Johnson 2001-03-27 17:28:20 UTC
rpm -Kv tests the package, not the header in the database.

What happens if you reinstall the package after you've converted to db3?
What I suspect is the well known "free list corrupt bug" showing up as a
truncated
header in the database ...

Comment 5 Aleksey Nogin 2001-03-27 17:34:19 UTC
As I said, the package is not (and never was) installed. Both rpm2html and rpmq
die when trying to query the .i386.rpm package, not the database.

Just to be sure, I did another --rebuilddb and (no surprize) it didn't change
anything.

Comment 6 Jeff Johnson 2001-03-28 16:16:16 UTC
Created attachment 13964 [details]
Patch to fix rpm-2.5.x i18n tag offset/length bug

Comment 7 Jeff Johnson 2001-03-28 16:17:00 UTC
Fixed in rpm CVS, will be in rpm-4.0.3

Comment 8 Aleksey Nogin 2001-04-12 17:13:41 UTC
Any estimates on when this will be available? Any plans for a new errata with
these fixes? 

Obviously, I can recompile RPM myself, but it would be so much easier to
download an install a package signed by RedHat :-)

Comment 9 Aleksey Nogin 2001-04-22 15:58:14 UTC
This bug still exists in the rpm shipped with RedHat 7.1 and I don't see the
fixed package anywhere.

Comment 10 Jeff Johnson 2001-04-22 16:10:45 UTC
And I repeat:

	Fixed in rpm CVS, will be in rpm-4.0.3

That does NOT say Red Hat 7.1 or rpm-4.0.2, and a failure of
a 2.5 year old package built with a broken version of rpm is
not a sufficient show stopper to change rpm in Red Hat 7.1

Comment 11 Aleksey Nogin 2001-04-22 16:19:36 UTC
Well, then it should be marked "RESOLVED CVS". :-) But marking it "RESOLVED
RAWHIDE" is inaccurate since Rawhide does not have an updated package.

Comment 12 Aleksey Nogin 2001-04-22 18:50:18 UTC
After I upgraded to 4.0.3, everyting seems fine. Thanks!