rpm Segfault

James Olin Oden joden at lee.k12.nc.us
Mon Aug 23 23:20:13 UTC 2004


On Mon, 23 Aug 2004, Scott Talbot wrote:

> 
> Well something has really screwed up this time!
> 
> On Friday last, I set about to update my box, I installed the 30 some
> programs, up2date failed near the end of the process.  After up2date did
> it's cleanup, 1 file was left xorg-x11-xdm.  I believe the failure was
> reported as a segfault, but possibly I am misremembering as I recall
> seeing something about a bad/mangled header.  Further attempts to
> install this file always resulted in a segfault, but when I did a rpm -
> qa | grep xorg, I found that rpm reported that the file was installed.
> 
> Ok. the xorg file is irrelevant to my problem in that any attempt to
> install any file results in a segfault.  I ran strace on it and found
> that the command exited at:
>
Scot, could you also send the gdb backtrace from the core file?

	gdb core
	bt
 
> open("/etc/rpm/macros", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file
> or directory)
> open("/etc/rpm/i386-linux/macros", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
> such file or directory)
> stat64("/root/.rpmmacros", 0xfef150d0)  = -1 ENOENT (No such file or
> directory)
> time(NULL)                              = 1093270943
> open("/proc/filesystems", O_RDONLY)     = 3
> read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 267
> close(3)                                = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> 
> only 1 other error is reported, just about the first open returns
> ENOENT:
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> directory)
> 
> but then the rpm continues until the above lines.
> 
> 
> What I've tried:
> 
> booted into FC2 and forced a re-install of rpm-4.10 
>    No errors - No help either
> 
> tested an rpm of rpm-4.02
> 	So many dependencies!
> 
> Listed contents of rpm and found that it provided a file macros,  at
> usr/lib/rpm and provided a link to that file in /etc
>    that may have worked but I found another missing file with the same
> name (macros) later on - removed link (how many different files named
> macros can rpm use?)
RPM uses a path for the macros defined in by default /usr/lib/rpm/rpmrc.
The var is called macropath and looks like this on my RH 9 system:

	macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros

It actually processes each of these that it finds,such that the last 
listed in the path wins.  This makes it fairly easy for you to overide
rpm defaults either globally in /etc/rpm/macros, or per user in 
~/.rpmmacros.   Also, there is a command line ouption to give rpm a 
different rpmrc file to read such that you can overide the macropath
pretty easily (sometimes this is a good thing to do in build 
environments).  

> 
> What's left:
>
Definately get that backtrace from gdb out.  Probably should file a 
bugzilla to reduce the noise on the list.   

Cheers...james 





More information about the fedora-test-list mailing list