Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 737548

Summary: python interpreter crashes in initpyexpat () during 'yum update'
Product: Red Hat Enterprise Linux 6 Reporter: Frantisek Reznicek <freznice>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.1CC: esammons, jakub
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-21 12:29:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The full transcript log and full backtrace from core file
none
Virtualization host - list of packages
none
Disassembly of the crashing function none

Description Frantisek Reznicek 2011-09-12 14:15:35 UTC
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.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.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'

Comment 1 Frantisek Reznicek 2011-09-12 14:17:01 UTC
Created attachment 522711 [details]
The full transcript log and full backtrace from core file

Comment 4 Frantisek Reznicek 2011-09-13 11:15:41 UTC
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

Comment 8 Dave Malcolm 2011-09-14 16:07:51 UTC
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

Comment 9 Dave Malcolm 2011-09-14 16:19:02 UTC
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

Comment 14 Frantisek Reznicek 2011-09-21 12:29:48 UTC
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 ***