From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (WinNT; U) Description of problem: When I verify a installed product with RPM-4.0.3 in Solaris 8 with the flag -vv, a coredump is produced. The debugging exit is: #rpm -V -vv CO_iM_PL_000001-GENERAL-29-1 D: opening db index /var/local/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/local/lib/rpm/Packages D: opening db index /var/local/lib/rpm/Name rdonly mode=0x0 D: ========== +++ CO_iM_PL_000001-GENERAL-29-1 D: opening db index /var/local/lib/rpm/Depends create mode=0x0 D: opening db index /var/local/lib/rpm/Basenames rdonly mode=0x0 D: opening db index /var/local/lib/rpm/Providename rdonly mode=0x0 D: Requires: /bin/sh YES (db provides) D: Requires: /bin/ksh YES (db provides) D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadIsBzip2) = 3.0.5-1 D: YES A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadFilesHavePrefix) = 4.0-1 D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides) D: NO A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: YES A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides) D: opening db index /var/local/lib/rpm/Conflictname rdonly mode=0x0 Segmentation Fault(coredump) The coredump is only produced when you use the flag "-vv" to debug. Thank in advance Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.rpm -V -vv package_name 2. 3. Actual Results: A core is produced in the actual directory Expected Results: Work fine Additional info: The stack backtrace is: # gdb /usr/local/bin/rpm GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"... (gdb) run -V -vv CO_iM_PL_000001-GENERAL-29-1 Starting program: /usr/local/bin/rpm -V -vv CO_iM_PL_000001-GENERAL-29-1 warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074 Program received signal SIGTRAP, Trace/breakpoint trap. 0xff3b27e0 in ?? () (gdb) bt #0 0xff3b27e0 in ?? () Cannot access memory at address 0x38 (gdb)
The SIGTRAP is from starting the helper binary. Please try gdb /usr/local/lib/rpm/rpmq ... (gdb) run -V -vv CO_iM_PL_000001-GENERAL-29-1 ... (gdb) bt
The stack backtrace for gdb rpmq is: # gdb /usr/local/lib/rpm/rpmq GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"... (gdb) run -V -vv CO_iM_PL_000001-GENERAL-29-1 Starting program: /usr/local/lib/rpm/rpmq -V -vv CO_iM_PL_000001-GENERAL-29-1 warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074 D: opening db index /var/local/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/local/lib/rpm/Packages D: opening db index /var/local/lib/rpm/Name rdonly mode=0x0 D: ========== +++ CO_iM_PL_000001-GENERAL-29-1 D: opening db index /var/local/lib/rpm/Depends create mode=0x0 D: opening db index /var/local/lib/rpm/Basenames rdonly mode=0x0 D: opening db index /var/local/lib/rpm/Providename rdonly mode=0x0 D: Requires: /bin/sh YES (db provides) D: Requires: /bin/ksh YES (db provides) D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: NO A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadIsBzip2) = 3.0.5-1 D: YES A rpmlib(PayloadFilesHavePrefix) <= 4.0-1 B rpmlib(PayloadFilesHavePrefix) = 4.0-1 D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides) D: NO A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(VersionedDependencies) = 3.0.3-1 D: YES A rpmlib(CompressedFileNames) <= 3.0.4-1 B rpmlib(CompressedFileNames) = 3.0.4-1 D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides) D: opening db index /var/local/lib/rpm/Conflictname rdonly mode=0x0 Program received signal SIGSEGV, Segmentation fault. 0xff0b303c in strlen () from /usr/lib/libc.so.1 (gdb) bt #0 0xff0b303c in strlen () from /usr/lib/libc.so.1 #1 0xff102890 in _doprnt () from /usr/lib/libc.so.1 #2 0xff104a04 in vsnprintf () from /usr/lib/libc.so.1 #3 0xff2cab84 in vrpmlog (code=7, fmt=0xff32e8f0 "%s: running %s script(s) (if any)\n", ap=0xffbef294) at rpmlog.c:139 #4 0xff2cad7c in rpmlog (code=7, fmt=0xff32e8f0 "%s: running %s script(s) (if any)\n") at rpmlog.c:203 #5 0xff314d38 in psmStage (psm=0xffbef4b8, stage=PSM_SCRIPT) at psm.c:1775 #6 0xff328ac0 in rpmVerifyScript (rootDir=0xffbef4b8 "", h=0x90d68, scriptFd=0x98b70) at verify.c:310 #7 0xff3290e0 in showVerifyPackage (qva=0x8f110, rpmdb=0x98b70, h=0x90d68) at verify.c:471 #8 0xff3162c4 in showMatches (qva=0x8f110, mi=0x971b0, showPackage=0xff329068 <showVerifyPackage>) at query.c:464 #9 0xff316b00 in rpmQueryVerify (qva=0x8f110, source=RPMQV_PACKAGE, arg=0xffbefd2f "CO_iM_PL_000001-GENERAL-29-1", rpmdb=0x9aff0, showPackage=0xff329068 <showVerifyPackage>) at query.c:747 #10 0xff32916c in rpmVerify (qva=0x8f110, source=RPMQV_PACKAGE, arg=0xffbefd2f "CO_iM_PL_000001-GENERAL-29-1") at verify.c:494 #11 0x18e50 in main (argc=4, argv=0xffffffff) at rpmqv.c:1478 (gdb)
Ahh, got it now, thanks for the backtrace. Solaris, unlike linux, is unhappy with NULL pointers as strings. The stage identifier from the verify transaction debug message is not being set. I'll have a fix in a bit ...
I believe this is the fix Index: lib/verify.c =================================================================== RCS file: /cvs/devel/rpm/lib/verify.c,v retrieving revision 2.59.4.29 diff -u -r2.59.4.29 verify.c --- lib/verify.c 2001/08/27 18:36:33 2.59.4.29 +++ lib/verify.c 2001/09/12 14:58:16 @@ -325,6 +325,7 @@ memset(psm, 0, sizeof(*psm)); psm->ts = ts; psm->fi = fi; + psm->stepName = "verify"; psm->scriptTag = RPMTAG_VERIFYSCRIPT; psm->progTag = RPMTAG_VERIFYSCRIPTPROG; rc = psmStage(psm, PSM_SCRIPT); Can you check that this fixes the segfault? Thanks ...
Fixed in rpm-4.0.3-1.04.
With the change that you proposed, all works fine. Thank yo very much A question: How Can I download the last version of rpm's?
If you want packages, look for rpm-4.0.3-1.04 in Raw Hide soon. Otherwise, use CVS cvs -d :pserver:anonymous.org:/cvs/devel login (no password, just carriage return) cvs -d :pserver:anonymous.org:/cvs/devel get rpm cd rpm cvs up -r rpm-4_0