Bug 603075 - ElectricFence doesn't support posix_memalign
Summary: ElectricFence doesn't support posix_memalign
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ElectricFence
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Petr Machata
QA Contact: Michal Nowak
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-11 13:40 UTC by Gerd Hoffmann
Modified: 2015-05-05 01:35 UTC (History)
7 users (show)

Fixed In Version: ElectricFence-2.2.2-28
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 692100 (view as bug list)
Last Closed: 2010-11-10 22:06:41 UTC

Attachments (Terms of Use)
Test case (759 bytes, text/plain)
2010-06-24 12:57 UTC, Petr Machata
no flags Details
Fix (1.19 KB, patch)
2010-06-24 12:58 UTC, Petr Machata
no flags Details | Diff

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):

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-
#8  0x000000000042804a in kvm_main_loop () at /usr/src/debug/qemu-kvm-
#9  0x000000000040defb in main_loop (argc=<value optimized out>, argv=<value optimized out>, 
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-
#10 main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-

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

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]

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.

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