yum Segmentation Fault

Posted by Adamba on 2011/9/8 15:54:04
Hey,
I'm using Centos 5.5, and every use of yum (like yum update, yum check-update and etc...) gives me immediately Segmentation Fault.

here's a strace for yum update:
Strace yum update

Can't figure out why i'm getting a segmentation fault
I even tried to raise the debuglevel of yum to 10 but it doesn't seems to change anything, yum isn't updating it's yum.log file...

can anyone help me?

Re: yum Segmentation Fault

Posted by gerald_clark on 2011/9/8 15:59:00
Welcome to CentOS.
New users need to read:
http://www.centos.org/modules/newbb/viewforum.php?forum=47

Please provide your system information as explained in the first link.

Re: yum Segmentation Fault

Posted by TrevorH on 2011/9/8 17:18:34
Did you try `yum clean all` already?

Re: yum Segmentation Fault

Posted by Adamba on 2011/9/8 19:10:28
Here's the output of getinfo:
== BEGIN uname -rmi ==
2.6.18-194.el5PAE i686 i386
== END   uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
centos-release-notes-5.5-0
centos-release-5-5.el5.centos
rpmforge-release-0.3.6-1.el5.rf
== END   rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 5.5 (Final)
== END   cat /etc/redhat-release ==

== BEGIN getenforce ==
Disabled
== END   getenforce ==

== BEGIN free -m ==
             total       used       free     shared    buffers     cached
Mem:          8111        503       7607          0         48        384
-/+ buffers/cache:         71       8039
Swap:         2047          0       2047
== END   free -m ==

== BEGIN rpm -q yum rpm python ==
yum-3.2.22-33.el5.centos
rpm-4.4.2.3-22.el5
python-2.4.3-43.el5
== END   rpm -q yum rpm python ==

== BEGIN ls /etc/yum.repos.d ==
CentOS-Base.repo
CentOS-Media.repo
mirrors-rpmforge
rpmforge.repo
== END   ls /etc/yum.repos.d ==

== BEGIN cat /etc/yum.conf ==
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=10
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
== END   cat /etc/yum.conf ==

== BEGIN yum repolist all ==
./getinfo.sh: line 87: 23098 Segmentation fault      yum repolist all
== END   yum repolist all ==

== BEGIN egrep 'include|exclude' /etc/yum.repos.d/*.repo ==
== END   egrep 'include|exclude' /etc/yum.repos.d/*.repo ==

== BEGIN sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==
== END   sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==


== BEGIN fdisk -l ==

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1        1305    10482381   83  Linux
/dev/cciss/c0d0p2            1306        1566     2096482+  82  Linux swap / Solaris
/dev/cciss/c0d0p3            1567       17844   130753035    f  W95 Ext'd (LBA)
/dev/cciss/c0d0p5            1567        1567        8001   83  Linux
/dev/cciss/c0d0p6            1567        1567          30+  83  Linux
/dev/cciss/c0d0p7            1588        2439     6835938   83  Linux
/dev/cciss/c0d0p8            2440       17844   123740631   83  Linux

Partition table entries are not in disk order
== END   fdisk -l ==

== BEGIN blkid ==
/dev/cciss/c0d0p2: LABEL="SW-cciss/c0d0p2" TYPE="swap" 
/dev/cciss/c0d0p1: LABEL="/" UUID="f82fc540-a9b7-4151-925e-e90f0a2e5968" TYPE="ext3" 
== END   blkid ==

== BEGIN cat /proc/mdstat ==
Personalities : 
unused devices: <none>
== END   cat /proc/mdstat ==

== BEGIN pvs ==
== END   pvs ==

== BEGIN vgs ==
== END   vgs ==

== BEGIN lvs ==
== END   lvs ==

== BEGIN rpm -qa kernel\* | sort ==
kernel-2.6.18-238.19.1.el5
kernel-headers-2.6.18-194.el5
kernel-PAE-2.6.18-194.el5
kernel-PAE-devel-2.6.18-194.el5
== END   rpm -qa kernel\* | sort ==

== BEGIN lspci ==
00:00.0 Host bridge: Intel Corporation 5520 I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:02.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 2 (rev 13)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
00:04.0 PCI bridge: Intel Corporation 5520/X58 I/O Hub PCI Express Root Port 4 (rev 13)
00:05.0 PCI bridge: Intel Corporation 5520/X58 I/O Hub PCI Express Root Port 5 (rev 13)
00:06.0 PCI bridge: Intel Corporation 5520/X58 I/O Hub PCI Express Root Port 6 (rev 13)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)
00:08.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 8 (rev 13)
00:09.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 9 (rev 13)
00:0a.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 10 (rev 13)
00:0d.0 Host bridge: Intel Corporation Unknown device 343a (rev 13)
00:0d.1 Host bridge: Intel Corporation Unknown device 343b (rev 13)
00:0d.2 Host bridge: Intel Corporation Unknown device 343c (rev 13)
00:0d.3 Host bridge: Intel Corporation Unknown device 343d (rev 13)
00:0d.4 Host bridge: Intel Corporation 5520/5500/X58 Physical Layer Port 0 (rev 13)
00:0d.5 Host bridge: Intel Corporation 5520/5500 Physical Layer Port 1 (rev 13)
00:0d.6 Host bridge: Intel Corporation Unknown device 341a (rev 13)
00:0e.0 Host bridge: Intel Corporation Unknown device 341c (rev 13)
00:0e.1 Host bridge: Intel Corporation Unknown device 341d (rev 13)
00:0e.2 Host bridge: Intel Corporation Unknown device 341e (rev 13)
00:0e.3 Host bridge: Intel Corporation Unknown device 341f (rev 13)
00:0e.4 Host bridge: Intel Corporation Unknown device 3439 (rev 13)
00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 5
00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.3 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIB (ICH10) LPC Interface Controller
01:00.0 System peripheral: Hewlett-Packard Company iLO3 Slave instrumentation & System support (rev 05)
01:00.1 VGA compatible controller: Matrox Graphics, Inc. Unknown device 0533
01:00.2 System peripheral: Hewlett-Packard Company iLO3 Management Processor Support and Messaging (rev 05)
01:00.4 USB Controller: Hewlett-Packard Company Proliant iLO2 virtual USB controller (rev 02)
02:00.0 Ethernet controller: ServerEngines Corp. Emulex OneConnect 10Gb NIC (be3) (rev 01)
02:00.1 Ethernet controller: ServerEngines Corp. Emulex OneConnect 10Gb NIC (be3) (rev 01)
02:00.2 Mass storage controller: ServerEngines Corp. Emulex OneConnect 10Gb iSCSI Initiator (be3) (rev 01)
02:00.3 Mass storage controller: ServerEngines Corp. Emulex OneConnect 10Gb iSCSI Initiator (be3) (rev 01)
0c:00.0 RAID bus controller: Hewlett-Packard Company Smart Array G6 controllers (rev 01)
== END   lspci ==

== BEGIN lspci -n ==
00:00.0 0600: 8086:3406 (rev 13)
00:01.0 0604: 8086:3408 (rev 13)
00:02.0 0604: 8086:3409 (rev 13)
00:03.0 0604: 8086:340a (rev 13)
00:04.0 0604: 8086:340b (rev 13)
00:05.0 0604: 8086:340c (rev 13)
00:06.0 0604: 8086:340d (rev 13)
00:07.0 0604: 8086:340e (rev 13)
00:08.0 0604: 8086:340f (rev 13)
00:09.0 0604: 8086:3410 (rev 13)
00:0a.0 0604: 8086:3411 (rev 13)
00:0d.0 0600: 8086:343a (rev 13)
00:0d.1 0600: 8086:343b (rev 13)
00:0d.2 0600: 8086:343c (rev 13)
00:0d.3 0600: 8086:343d (rev 13)
00:0d.4 0600: 8086:3418 (rev 13)
00:0d.5 0600: 8086:3419 (rev 13)
00:0d.6 0600: 8086:341a (rev 13)
00:0e.0 0600: 8086:341c (rev 13)
00:0e.1 0600: 8086:341d (rev 13)
00:0e.2 0600: 8086:341e (rev 13)
00:0e.3 0600: 8086:341f (rev 13)
00:0e.4 0600: 8086:3439 (rev 13)
00:14.0 0800: 8086:342e (rev 13)
00:14.1 0800: 8086:3422 (rev 13)
00:14.2 0800: 8086:3423 (rev 13)
00:1c.0 0604: 8086:3a40
00:1c.4 0604: 8086:3a48
00:1d.0 0c03: 8086:3a34
00:1d.1 0c03: 8086:3a35
00:1d.2 0c03: 8086:3a36
00:1d.3 0c03: 8086:3a39
00:1d.7 0c03: 8086:3a3a
00:1e.0 0604: 8086:244e (rev 90)
00:1f.0 0601: 8086:3a18
01:00.0 0880: 103c:3306 (rev 05)
01:00.1 0300: 102b:0533
01:00.2 0880: 103c:3307 (rev 05)
01:00.4 0c03: 103c:3300 (rev 02)
02:00.0 0200: 19a2:0710 (rev 01)
02:00.1 0200: 19a2:0710 (rev 01)
02:00.2 0180: 19a2:0712 (rev 01)
02:00.3 0180: 19a2:0712 (rev 01)
0c:00.0 0104: 103c:323a (rev 01)
== END   lspci -n ==

== BEGIN lsusb ==
Bus 006 Device 001: ID 0000:0000  
Bus 006 Device 002: ID 03f0:7029 Hewlett-Packard 
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 005 Device 001: ID 0000:0000  
== END   lsusb ==

== BEGIN grep net /etc/nsswitch.conf ==
#networks:   nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     
netmasks:   files
networks:   files
netgroup:   nisplus
== END   grep net /etc/nsswitch.conf ==

== BEGIN chkconfig --list | grep -Ei 'network|wpa' ==
NetworkManager 	0:off	1:off	2:off	3:off	4:off	5:off	6:off
network        	0:off	1:off	2:on	3:on	4:on	5:on	6:off
wpa_supplicant 	0:off	1:off	2:off	3:off	4:off	5:off	6:off
== END   chkconfig --list | grep -Ei 'network|wpa' ==



about yum clean all, that was the first thing i tried to do, but i'm still getting segmentation fault.

Re: yum Segmentation Fault

Posted by TrevorH on 2011/9/8 19:17:56
Quote:

about yum clean all, that was the first thing i tried to do, but i'm still getting segmentation fault.


I asked because the last thing I could see it do in your strace output was to read /var/cache/yum/addons/primary.xml.gz and the data it showed coming from that file looked like garbage.

Re: yum Segmentation Fault

Posted by Adamba on 2011/9/9 13:28:39
I have Done another 'yum clean all'
and here's the strace of yum update right afterwards:
strace yum update

Re: yum Segmentation Fault

Posted by TrevorH on 2011/9/9 14:22:55
So right at the end it says

Quote:

open("/var/cache/yum/addons/primary.xml.gz", O_RDONLY|O_LARGEFILE) = 6
_llseek(6, 0, [0], SEEK_CUR) = 0
read(6, "\37\213\10\10\0\0\0\0\2\377/home/centos-master2/c"..., 8192) = 202


Which shows it opening /var/cache/yum/addons/primary.xml.gz and reading data from that file. That data appears to contain "/home/centos-master2/c" among other stuff. Might want to look at that file and see what its contents are.

Re: yum Segmentation Fault

Posted by Adamba on 2011/9/9 18:04:27
this is the content of the file primary.xml.gz:
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="0">

</metadata>


Re: yum Segmentation Fault

Posted by pschaff on 2011/9/19 21:43:23
Please show
ls /etc/yum.repos.d/
cat /etc/yum.repos.d/CentOS-Base.repo


Re: yum Segmentation Fault

Posted by thaMANSTA on 2011/10/1 4:33:44
I am having the same problem. I have two machines, both with the same files in /etc/yum.repo.d/ and for some reason on is segfaulting and the other is not. Here is a side-by-side comparison stack trace:

http://pastebin.com/HPie23TQ

I generated this by running 'yum clean all' and then 'strace yum check-update 2>&1'

Any help would be greatly appreciated! At wits end here!

Re: yum Segmentation Fault

Posted by pschaff on 2011/10/1 11:10:38
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

After reading those links you should realize why you should not hijack threads as you have done. Please start a new Topic for your issue to get the attention you need, providing a link to this one if required for context.

Re: yum Segmentation Fault

Posted by mrendell on 2012/1/6 19:20:30
Had this problem on a system and found that the problem (the segmentation
fault in strncmp() called from __xmlParserInputBufferCreateFilename())
is caused by libxml2 code that is intended to check if the file being
opened is compressed. The bug has been fixed in current versions of
libxml2, but not in the current CentOS 4.x or 5.x version. A solution
(there are probably better ones) is to get the libxml2 CentOS source rpm,
patch it, generate a binary rpm and install it on top of the current one.

Attached is a patch to /usr/src/redhat/BUILD/libxml2-2.6.26/xmlIO.c
(added code is from the current version of libxml2).

Re: yum Segmentation Fault

Posted by TrevorH on 2012/1/6 20:45:45
If you'd like this fixed then the best thing to do is to open a bugzilla report on http://bugzilla.redhat.com and attach your patch there. CentOS is bug for bug compatible with RHEL so unless it's fixed upstream, it won't get fixed in CentOS

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=38&topic_id=33153