Bug 603075 - ElectricFence doesn't support posix_memalign
ElectricFence doesn't support posix_memalign
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ElectricFence (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Petr Machata
Michal Nowak
Depends On:
  Show dependency treegraph
Reported: 2010-06-11 09:40 EDT by Gerd Hoffmann
Modified: 2015-05-04 21:35 EDT (History)
7 users (show)

See Also:
Fixed In Version: ElectricFence-2.2.2-28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 692100 (view as bug list)
Last Closed: 2010-11-10 17:06:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Gerd Hoffmann 2010-06-11 09:40:21 EDT
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 09:52:54 EDT
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 10:23:30 EDT
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 08:57:12 EDT
Created attachment 426561 [details]
Test case
Comment 5 Petr Machata 2010-06-24 08:58:09 EDT
Created attachment 426562 [details]

This patch adds the support for posix_memalign to ElectricFence.
Comment 12 releng-rhel@redhat.com 2010-11-10 17:06:41 EST
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.