[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Segfault in dependency checking...
- From: James Olin Oden <joden malachi lee k12 nc us>
- To: rpm-list redhat com
- Subject: Segfault in dependency checking...
- Date: Sun, 10 Aug 2003 16:50:11 -0400 (EDT)
Hi Jeff,
I am not sure if this is my bug or yours, so this is why
I am sending to the list first.
Anyway I was trying to upgrade two rpms (this was as a test
by the way, to make sure I had not broken anything), and when
I do this I get a core dump. Now my first thought was that I caused
it except its in the dependcy checking which is before anything I had
touched (actually, it was before it ever got to rpmtsRun()). Here is
the output from gdb showing the back trace:
#0 0x420796b8 in strcmp () from /lib/tls/libc.so.6(gdb) bt
#0 0x420796b8 in strcmp () from /lib/tls/libc.so.6
#1 0x40047bfd in indexcmp (one=0x807b420, two=0x29) at rpmal.c:538
#2 0x40048364 in rpmalAllSatisfiesDepend (al=0x807b6a0, ds=0x80839a8, keyp=0x0)
at rpmal.c:754
#3 0x400484f0 in rpmalSatisfiesDepend (al=0x29, ds=0x29, keyp=0x29) at rpmal.c:800
#4 0x4003053f in unsatisfiedDepend (ts=0x80717f0, dep=0x80839a8, adding=0) at depends.c:445
#5 0x40030bdf in checkPackageDeps (ts=0x80717f0, pkgNEVR=0x807c278 "openssl-0.9.7a-5",
requires=0x80839a8, conflicts=0x0, depName=0x8083b18 "/bin/sh", tscolor=0, adding=0)
at depends.c:604
#6 0x40030e2e in checkPackageSet (ts=0x80717f0, dep=0x8083b18 "/bin/sh", mi=0x8080d08,
adding=0) at depends.c:696
#7 0x40030ed4 in checkDependentPackages (ts=0x80717f0, dep=0x8083b18 "/bin/sh")
at depends.c:723
#8 0x40032ac7 in rpmtsCheck (ts=0x80717f0) at depends.c:1688
#9 0x40051ada in rpmInstall (ts=0x80717f0, ia=0x805b9b8, fileArgv=0x8069a18)
at rpminstall.c:628
#10 0x0804b459 in main ()
#11 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
Now when I go to the last bit of code in rpm that was called before the
segfault, I see a simple string compare between to strings that are
comming from availableIndexEntry structures. My guess is that somehow
one of these is not getting initialized, but when I look at the code in
depends.c and rpmal.c its not exactly obvious why they are not being
initialed.
Here is the test I am running:
1) install an rpm works-1-1.i386.rpm.
2) upgrade to works-1-2.i386.rpm and broken-1-1.i386.rpm.
broken has a scriptlet that returns an error in it to
test my autorollback patch.
Now I am making a copy of an existing rpm database, and setting __dbpath
to the location of this alternate database. Here are the commands
I am actually running:
/bin/rpm -Uvh \
--define '_dbpath /root/rpm/rpm-test-harness/db' \
/root/work/build/RPM/RPMS/i386/works-1-1.i386.rpm
/bin/rpm -Uvh \
--define '_dbpath /root/rpm/rpm-test-harness/db' \
--define '_repackage_dir /root/rpm/rpm-test-harness/rpdir' \
/root/work/build/RPM/RPMS/i386/broken-1-1.i386.rpm \
/root/work/build/RPM/RPMS/i386/works-1-2.i386.rpm
Hmmm...I just figured it out, I was pasting in the spec files for your
perusal, and realized that works-1-1 had:
Provides: /bin/sh
in it. This has hung around from when I was not testing with a fully
populated database. Anyway, when I take that out the segfault goes away.
So it looks like their may be a general problem when two packages provide
the same thing, and then someone later goes to upgrade with something that
requires that thing. Now, I know that someone should not do that, but
probably this should be handled better.
Anyway, I will bugzilla this now that I figured out what is going on.
Cheers...james
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]