Bug 626279 - /usr/bin/python: malloc(): smallbin double linked list corrupted
/usr/bin/python: malloc(): smallbin double linked list corrupted
Status: CLOSED DUPLICATE of bug 607650
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Dave Malcolm
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-22 23:37 EDT by Qixiang Wan
Modified: 2010-10-20 11:36 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 11:36:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace log (530.18 KB, text/plain)
2010-08-22 23:38 EDT, Qixiang Wan
no flags Details

  None (edit)
Description Qixiang Wan 2010-08-22 23:37:32 EDT
Description of problem:
while using edit-livecd to edit iso, the process can easily hang due to the error "*** glibc detected *** /usr/bin/python: malloc(): smallbin double linked list corrupted: 0x0000000001678b40 ***"

Version-Release number of selected component (if applicable):
livecd-tools-031-1.7.el6.x86_64

How reproducible:
about 40%~60% in my environment

Steps to Reproduce:
1. $ strace -o strace.log edit-livecd -s=/root/null.sh /root/rhev/rhev-hypervisor.iso
python: Objects/frameobject.c:633: PyFrame_New: Assertion `f->f_code == code' failed.
*** glibc detected *** /usr/bin/python: malloc(): smallbin double linked list corrupted: 0x0000000001678b40 ***
Killed
  
Actual results:
edit-livecd hang there, strace show it hang at:
[...]
writev(3, [{"*** glibc detected *** ", 23}, {"/usr/bin/python", 15}, {": ", 2}, {"malloc(): smallbin double linked"..., 47}, {": 0x", 4}, {"0000000001678b40", 16}, {" ***\n", 5}], 7) = 112
futex(0x339037ae80, FUTEX_WAIT_PRIVATE, 2, NULL 
[...]

Expected results:
should not hang.

Additional info:
Comment 1 Qixiang Wan 2010-08-22 23:38:41 EDT
Created attachment 440284 [details]
strace log
Comment 3 Qixiang Wan 2010-08-23 04:11:13 EDT
as there is error parameter in the command lines: -s=/root/null.sh (comment #2 in bug 626283 ) , I need to check whether this problem related to this error param. I will close it if I can't reproduce it with right command line.
Comment 4 Qixiang Wan 2010-08-23 04:20:10 EDT
yes, I still can reproduce it with a right command line:
$ edit-livecd -s /root/rhev/edit-nostaf.sh /root/rhev/rhev-hypervisor.iso 
python: Objects/frameobject.c:633: PyFrame_New: Assertion `f->f_code == code' failed.
*** glibc detected *** /usr/bin/python: malloc(): smallbin double linked list corrupted: 0x000000000163c240 ***
Comment 5 David Brown 2010-10-08 20:17:16 EDT
So I've actually noticed this from a pxeboot install of RHEL6.

It reproduces fairly easily after some amount of yum install commands.

1. pxeboot base rhel6 x86_64 using text mode (this means very minimal install)
2. yum -y install rpm-build redhat-rpm-config autoconf automake libtool gcc make

Then it gets to installing rpm-build and it hits the 
*** glibc detected *** /usr/bin/python: malloc(): smallbin double linked list corrupted: 0x0000xxxxxx ***
Comment 6 Alan Pevec 2010-10-14 06:25:53 EDT
This looks like python issue, not specific to edit-livecd script
Comment 7 Dave Malcolm 2010-10-14 11:23:29 EDT
Please can you install python-debuginfo and provide a backtrace from yum.

To do the latter, you can use:
  gdb --args python /usr/bin/yum ARGS_TO_YUM

This looks like a heap corruption issue, perhaps in one of the DSOs that python links to via importing modules.
Comment 8 Dave Malcolm 2010-10-14 11:24:49 EDT
One other question: are you seeing this on bare metal, or on a guest running under a hypervisor?
Comment 9 David Brown 2010-10-14 13:09:08 EDT
Some additional info, on the setup.

I'm running rhel6 as a guest under an Ubuntu 10.04 system. I also have a Fedora 13 system at home I can try as well, I just haven't yet. I give the guest 4 procs and 4096 Mb memory with 40Gb hard drive. Standard default networking in virt-manager.

Interestingly enough I got one that works now, but I only gave it one cpu. This maybe an issue with smp guests?
Comment 10 Dave Malcolm 2010-10-14 16:14:39 EDT
Thanks; this could perhaps be yet another duplicate of bug 607650.

Are you able to reproduce this problem on bare-metal?
Comment 11 Qixiang Wan 2010-10-20 11:27:02 EDT
(In reply to comment #10)
> Thanks; this could perhaps be yet another duplicate of bug 607650.
> 
> Are you able to reproduce this problem on bare-metal?

sorry, I missed the needinfo. I also saw this on a kvm guest. I tried to reproduce this on bare-metal machine (for about 30 times), but haven't met the same problem.
Comment 12 Dave Malcolm 2010-10-20 11:36:19 EDT
Thanks for the information.

If I'm reading these comments correctly, it seems like every time this bug has been seen has been when running as a guest on KVM, and attempts to reproduce it on bare metal fail.

This makes it look a lot like a duplicate of bug 607650 - a bug in the hypervisor leading to corrupt memory in guest OSes, leading to a variety of crashes within the user-space processes in the guest, typically in python as it's one of the first things that runs in a fresh system (e.g. anaconda).

I'm going to close this one as a duplicate of that bug.  Feel free to reopen this one, especially if you can reproduce it on bare-metal.

*** This bug has been marked as a duplicate of bug 607650 ***

Note You need to log in before you can comment on or make changes to this bug.