Description of problem: rpm --rebuilddb -vv dumps always core on one box. Version-Release number of selected component (if applicable): rpm-4.0.2-6x How reproducible: Always Steps to Reproduce: rpm --rebuilddb -vv Actual Results: Segmentation fault (core dumped) Backtrace from gdb: #0 0x400622be in providePackageNVR () from /usr/lib/librpm.so.0 #1 0x4007f844 in doGetRecord () from /usr/lib/librpm.so.0 #2 0x4007fb37 in db1cget () from /usr/lib/librpm.so.0 #3 0x40068663 in dbiGet () from /usr/lib/librpm.so.0 #4 0x4006aa59 in XrpmdbNextIterator () from /usr/lib/librpm.so.0 #5 0x4006d52d in rpmdbRebuild () from /usr/lib/librpm.so.0 #6 0x804a2f0 in poptResetContext () #7 0x4016b9cb in __libc_start_main (main=0x8049c84 <poptResetContext+2712>, argc=4, argv=0xbffffb44, init=0x8048ecc <_init>, fini=0x804a3bc <_fini>, rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffb3c) at ../sysdeps/generic/libc-start.c:92
Ok, after Googling around I found this solution: Download following packages from: ftp://people.redhat.com/jbj/rpm-4.0.4-6x/ popt-1.6.4-6x.21.i386.rpm rpm-4.0.4-6x.21.i386.rpm (and others if you need them) Upgrade them: rpm -Uvh rpm-4.0.4-6x.21.i386.rpm popt-1.6.4-6x.21.i386.rpm (ps. I had to remove ucd-snmp and ucd-snmp-utils as they depend on rpm-4.0.2!) After upgrading just run rpm --rebuilddb and everything works again. I strongly suggest releasing rpm-4.0.4 officially as this bug seems to bother many people and it's not trivial to find a way to fix it.
Additionally, you can downgrade back to rpm-4.0.2 after you've rebuilded your rpm db with rpm-4.0.4. This might be required if you use fe. apt or something else that requires rpm-4.0.2.
Downgrading to rpm-4.0.2 is silly, recompile whatever packages have dependencies is better solution. Make sure you do --rebuilddb to convert from db1 ->db3, traceback shows that you have not done this.
Hi. What part of downgrading to _official_ version of RPM you find silly? :o I don't compile any packages myself if I just can avoid it. And I will avoid it as there's no reason to do it. That's RedHat's task. :) Secondly, what do you mean by converting db1 -> db3? Do you mean that upgrading from RPM 3.x to 4.0.2 does not do it automatically? If not, there's a bug in RPM 4.0.2 spec obviously. And last, why did you mark this as "WORKSFORME" as there's clearly a bug? Even if there's a solution to go around this bug, it does not mean the bug is gone away.