Bug 603075

Summary: ElectricFence doesn't support posix_memalign
Product: Red Hat Enterprise Linux 6 Reporter: Gerd Hoffmann <kraxel>
Component: ElectricFenceAssignee: Petr Machata <pmachata>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Nowak <mnowak>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: mkenneth, mnewsome, mnowak, ohudlick, pmuller, syeghiay, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ElectricFence-2.2.2-28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 692100 (view as bug list) Environment:
Last Closed: 2010-11-10 22:06:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Test case
none
Fix none

Description Gerd Hoffmann 2010-06-11 13:40:21 UTC
Description of problem:
Trying to running qemu with electric fence results in $summary

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.71.el6.x86_64

How reproducible:
ef /usr/libexec/qemu-kvm -L /usr/share/qemu-kvm -vnc :0,to=8 -name winxp -m 1024 -monitor unix:/root/.qemu-gtk/winxp,server,nowait -drive file=/vmdisk/guest-winxp.img,media=disk,if=ide,index=0,id=system -drive file=/mort/distiso/microsoft/winxp-sp3-kraxel.iso,media=cdrom,if=ide,index=2,id=cdrom -net tap,script=/root/bin/qemu-ifup,downscript= -net nic,model=e1000,macaddr=52:54:00:78:23:6f -serial unix:,server,nowait -enable-kvm -localtime -usbdevice tablet -vga std

Actual results:
ElectricFence Aborting: free(7fa424019200): address not from malloc().

Expected results:
guest boots fine

Additional info:
(gdb) bt
#0  0x00000030b3832ca7 in kill () from /lib64/libc.so.6
#1  0x00007fa46d440165 in ?? () from /usr/lib64/libefence.so.0.0
#2  0x00007fa46d4406dd in EF_Abort () from /usr/lib64/libefence.so.0.0
#3  0x00007fa46d43f9d3 in free () from /usr/lib64/libefence.so.0.0
#4  0x000000000048cd4e in qcow_aio_read_cb (opaque=0x7fa42bf30f18, ret=0) at block/qcow2.c:478
#5  0x000000000047d748 in posix_aio_process_queue (opaque=0x7fa46d097ff0) at posix-aio-compat.c:460
#6  0x000000000047d848 in posix_aio_read (opaque=0x7fa46d097ff0) at posix-aio-compat.c:501
#7  0x000000000040af8f in main_loop_wait (timeout=1000)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4074
#8  0x000000000042804a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2127
#9  0x000000000040defb in main_loop (argc=<value optimized out>, argv=<value optimized out>, 
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4284
#10 main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6416
(gdb)

Comment 2 RHEL Product and Program Management 2010-06-11 13:52:54 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Gerd Hoffmann 2010-06-11 14:23:30 UTC
Memory allocation comes from posix_memalign().

ElectricFence just doesn't know about that one:

# objdump -T /usr/lib64/libefence.so | grep memalign
00000000000019e0 g    DF .text  0000000000000422  Base        memalign

Comment 4 Petr Machata 2010-06-24 12:57:12 UTC
Created attachment 426561 [details]
Test case

Comment 5 Petr Machata 2010-06-24 12:58:09 UTC
Created attachment 426562 [details]
Fix

This patch adds the support for posix_memalign to ElectricFence.

Comment 12 releng-rhel@redhat.com 2010-11-10 22:06:41 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.