Red Hat Bugzilla – Bug 737548
python interpreter crashes in initpyexpat () during 'yum update'
Last modified: 2015-11-15 20:13:37 EST
Description of problem: An update process done by yum clean all ; yum update commands ocassionaly crashed with segmentation fault on an RHEL 6.1 i686 VM (hosted by RHEL5.7 x86_64) See terminal transcript below in last section. The crash was pointing out pyexpat module: Core was generated by `/usr/bin/python /usr/bin/yum update'. Program terminated with signal 11, Segmentation fault. #0 0x00b3373f in initpyexpat () at /usr/src/debug/Python-2.6.6/Modules/pyexpat.c:1919 1919 ErrorObject = PyErr_NewException("xml.parsers.expat.ExpatError", Missing separate debuginfos, use: ... (gdb) #0 0x00b3373f in initpyexpat () at /usr/src/debug/Python-2.6.6/Modules/pyexpat.c:1919 #1 0x00cc7a16 in _PyImport_LoadDynamicModule (name=0xbf8f434b "pyexpat", pathname=0xbf8f329b "/usr/lib/python2.6/lib-dynload/pyexpat.so", fp=0xa091f58) at Python/importdl.c:53 #2 0x00cc4e20 in load_module (name=0xbf8f434b "pyexpat", fp=<value optimized out>, buf=0xbf8f329b "/usr/lib/python2.6/lib-dynload/pyexpat.so", type=3, loader=0x0) at Python/import.c:1830 #3 0x00cc593f in import_submodule (mod=None, subname=0xbf8f434b "pyexpat", fullname=0xbf8f434b "pyexpat") at Python/import.c:2592 #4 0x00cc5c3c in load_next (mod=None, altmod=None, p_name=0xbf8f433c, buf=0xbf8f434b "pyexpat", p_buflen=0xbf8f4344) at Python/import.c:2412 Version-Release number of selected component (if applicable): [root@dhcp-lab-231 ~]# rpm -q yum python yum-3.2.29-17.el6.noarch python-2.6.6-20.el6.i686 How reproducible: 40% Steps to Reproduce: 1. yum clean all ; yum update 2. reboot 3. yum clean all ; yum update Actual results: yum upgrade ends with segmentation fault in a python module Expected results: yum upgrade performs operation and exits cleanly Additional info: [root@dhcp-lab-231 ~]# yum clean all ; yum update Cleaning repos: rhel61-brq rhel61-brq-debuginfo rhel61-brq-optional : rhel61-brq-supplementary rhel61-brq-supplementary-debug : rhel61-brq-updates Cleaning up Everything rhel61-brq | 4.0 kB 00:00 rhel61-brq/primary_db | 2.4 MB 00:00 rhel61-brq-debuginfo | 3.0 kB 00:00 rhel61-brq-debuginfo/primary_db | 342 kB 00:00 rhel61-brq-optional | 3.8 kB 00:00 rhel61-brq-optional/primary_db | 1.0 MB 00:00 rhel61-brq-supplementary | 4.0 kB 00:00 rhel61-brq-supplementary/primary_db | 30 kB 00:00 rhel61-brq-supplementary-debug | 3.0 kB 00:00 rhel61-brq-supplementary-debug/primary_db | 1.2 kB 00:00 rhel61-brq-updates | 2.2 kB 00:00 rhel61-brq-updates/primary_db | 3.7 MB 00:00 Setting up Update Process No Packages marked for Update [root@dhcp-lab-231 ~]# reboot Broadcast message from root@dhcp-lab-231.englab.brq.redhat.com (/dev/pts/0) at 15:39 ... The system is going down for reboot NOW! [root@dhcp-lab-231 ~]# Connection to dhcp-lab-231.englab.brq.redhat.com closed by remote host. Connection to dhcp-lab-231.englab.brq.redhat.com closed. [freznice@dhcp-26-251 ~]$ ssh root@dhcp-lab-231.englab.brq.redhat.com Last login: Mon Sep 12 14:46:39 2011 from dhcp-26-251.brq.redhat.com [root@dhcp-lab-231 ~]# yum clean all ; yum update Cleaning repos: rhel61-brq rhel61-brq-debuginfo rhel61-brq-optional : rhel61-brq-supplementary rhel61-brq-supplementary-debug : rhel61-brq-updates Cleaning up Everything Segmentation fault [root@dhcp-lab-231 ~]# rpm -q yum yum-3.2.29-17.el6.noarch [root@dhcp-lab-231 ~]# ulimit -c unlimited [root@dhcp-lab-231 ~]# yum clean all ; yum update Cleaning repos: rhel61-brq rhel61-brq-debuginfo rhel61-brq-optional : rhel61-brq-supplementary rhel61-brq-supplementary-debug : rhel61-brq-updates Cleaning up Everything Segmentation fault (core dumped) [root@dhcp-lab-231 ~]# ls anaconda-ks.cfg dump.log install.log mrg_cluster_tests core.1360 dwn install.log.syslog rpmbuild [root@dhcp-lab-231 ~]# rpm -q yum python yum-3.2.29-17.el6.noarch python-2.6.6-20.el6.i686 [root@dhcp-lab-231 ~]# uname -a Linux dhcp-lab-231.englab.brq.redhat.com 2.6.32-131.12.1.el6.i686 #1 SMP Sun Jul 31 16:44:30 EDT 2011 i686 i686 i386 GNU/Linux [root@dhcp-lab-231 ~]# file core.1360 core.1360: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from '/usr/bin/python /usr/bin/yum update'
Created attachment 522711 [details] The full transcript log and full backtrace from core file
Created attachment 522897 [details] Virtualization host - list of packages I believe virt. host is updated, virtualization related packages are: [root@mrg-qe-06 ~]# rpm -qa | egrep -i '(virt|qemu|kvm)' | sort Virtualization-en-US-5.2-11 etherboot-zroms-kvm-5.4.4-15.el5 kmod-kvm-83-239.el5 kvm-83-239.el5 kvm-qemu-img-83-239.el5 libvirt-0.8.2-22.el5 libvirt-python-0.8.2-22.el5 python-virtinst-0.400.3-12.el5 qemu-common-0.10.5-1.el5.2 qemu-system-ppc-0.10.5-1.el5.2 qemu-system-sparc-0.10.5-1.el5.2 qemu-system-x86-0.10.5-1.el5.2 virt-manager-0.6.1-14.el5 virt-viewer-0.0.2-3.el5 See full list attached
Created attachment 523193 [details] Disassembly of the crashing function Crash site is: => 0x0139073f <+847>: add %al,(%eax) (gdb) p $pc $1 = (void (*)()) 0x139073f <initpyexpat+847> (gdb) p $eax $2 = 20518912 (gdb) p $al $3 = 0
Minimal reproducer on this machine: # python -c"import pyexpat" which upon running under gdb: # gdb --args python -c"import pyexpat" (gdb) run Starting program: /usr/bin/python -cimport\ pyexpat [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x004a773f in initpyexpat () at /usr/src/debug/Python-2.6.6/Modules/pyexpat.c:1919 1919 ErrorObject = PyErr_NewException("xml.parsers.expat.ExpatError", Missing separate debuginfos, use: debuginfo-install expat-2.0.1-9.1.el6.i686 glibc-2.12-1.25.el6_1.3.i686 (gdb) bt demonstrates that it's the same crash site. Something is going badly wrong inside /usr/lib/python2.6/lib-dynload/pyexpat.so
The machine had very high uptime with indeed old kernel and kvm module. After update & restart no more issues seen. Treated as understood linked to bug 615225. -> CLOSED / DUPLICATE *** This bug has been marked as a duplicate of bug 615225 ***