Bug 1666811 - GLib-WARNING **: gmem.c:489: custom memory allocation vtable not supported
Summary: GLib-WARNING **: gmem.c:489: custom memory allocation vtable not supported
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: qemu
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1360137
Blocks: 1594304
TreeView+ depends on / blocked
 
Reported: 2019-01-16 15:49 UTC by Peter Bieringer
Modified: 2022-06-01 09:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1360137
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Bieringer 2019-01-16 15:49:08 UTC
affected qemu-system-x86-2.0.0-1.el7.6.x86_64 is shipped from EPEL and also misses the mentioned upstream patch backport

+++ This bug was initially created as a clone of Bug #1360137 +++

Description of problem:
When start a guest on host with latest qemu-kvm version, there is warning prompt: "GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported"; while no the issue on host with latesst qemu-kvm-rhev version.

[root@intel-5205-32-1 home]# uname -r
3.10.0-475.el7.x86_64
[root@intel-5205-32-1 home]# rpm -qa|grep qemu
libvirt-daemon-driver-qemu-2.0.0-1.el7.x86_64
qemu-img-1.5.3-118.el7.x86_64
qemu-kvm-tools-1.5.3-118.el7.x86_64
ipxe-roms-qemu-20160127-1.git6366fa7a.el7.noarch
qemu-kvm-1.5.3-118.el7.x86_64
qemu-kvm-debuginfo-1.5.3-118.el7.x86_64
qemu-kvm-common-1.5.3-118.el7.x86_64
[root@intel-5205-32-1 home]# 
[root@intel-5205-32-1 home]# 
[root@intel-5205-32-1 home]# /usr/libexec/qemu-kvm -name 'avocado-vt-vm1' -vnc :0 -monitor stdio

(process:13080): GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) 


Version-Release number of selected component (if applicable):
Kernel: 3.10.0-475.el7.x86_64
Qemu-kvm: qemu-kvm-1.5.3-118.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Following patch already fix the bug, but not merged into latest QEMU 1.5.3 version:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=98cf48f60aa4999f5b2808569a193a401a390e6a

--- Additional comment from Ademar Reis on 2016-07-26 14:15:42 UTC ---

(In reply to Gu Nini from comment #0)
> Additional info:
> Following patch already fix the bug, but not merged into latest QEMU 1.5.3
> version:
> http://git.qemu.org/?p=qemu.git;a=commitdiff;
> h=98cf48f60aa4999f5b2808569a193a401a390e6a

commit 98cf48f60aa4999f5b2808569a193a401a390e6a
Author: Paolo Bonzini <pbonzini>
Date:   Wed Sep 16 17:38:44 2015 +0200

    trace: remove malloc tracing
    
    The malloc vtable is not supported anymore in glib, because it broke
    when constructors called g_malloc.  Remove tracing of g_malloc,
    g_realloc and g_free calls.
    
    Note that, for systemtap users, glib also provides tracepoints
    glib.mem_alloc, glib.mem_free, glib.mem_realloc, glib.slice_alloc
    and glib.slice_free.
    
    Signed-off-by: Paolo Bonzini <pbonzini>
    Reviewed-by: Alberto Garcia <berto>
    Message-id: 1442417924-25831-1-git-send-email-pbonzini
    Signed-off-by: Stefan Hajnoczi <stefanha>

--- Additional comment from Gu Nini on 2016-07-29 03:17:34 UTC ---

Found the same issue on rhel7.2z qemu-kvm-rhev versions:

[root@hp-z800-03 qemu-kvm]# rpm -qa|grep qemu
qemu-img-rhev-2.3.0-31.el7_2.20.x86_64
ipxe-roms-qemu-20160127-1.git6366fa7a.el7.noarch
qemu-kvm-tools-rhev-2.3.0-31.el7_2.20.x86_64
qemu-kvm-common-rhev-2.3.0-31.el7_2.20.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.20.x86_64
[root@hp-z800-03 qemu-kvm]# 
[root@hp-z800-03 qemu-kvm]# 
[root@hp-z800-03 qemu-kvm]# 
[root@hp-z800-03 qemu-kvm]# /usr/libexec/qemu-kvm -name 'avocado-vt-vm1' -vnc :0 -monitor stdio

(process:13902): GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported
QEMU 2.3.0 monitor - type 'help' for more information
(qemu)

--- Additional comment from Miroslav Rezanina on 2016-08-02 09:12:07 UTC ---

Fix included in qemu-kvm-1.5.3-121.el7

--- Additional comment from Gu Nini on 2016-08-04 07:34:55 UTC ---

Verify the bug on following sw versions:

Host kernel: 3.10.0-481.el7.x86_64
Qemu-kvm: qemu-kvm-1.5.3-121.el7.x86_64


There is no the warning prompt any more:
# /usr/libexec/qemu-kvm -name 'avocado-vt-vm1' -vnc :0 -monitor stdio
QEMU 1.5.3 monitor - type 'help' for more information
(qemu)

--- Additional comment from errata-xmlrpc on 2016-11-03 20:02:13 UTC ---

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2585.html

--- Additional comment from Ademar Reis on 2018-06-25 20:36:58 UTC ---



--- Additional comment from Peter Bieringer on 2019-01-16 13:38:07 UTC ---

can it be that this bug is only fixed for qemu-kvm, but not for qemu-system-x86_64

While trying to use packer from packer.io and qemu as builder I ran into:

2019/01/16 13:32:11 packer: 2019/01/16 13:32:11 Executing /usr/bin/qemu-system-x86_64: []string{"-vnc", "127.0.0.1:66", "-machine", "type=pc,accel=tcg", "-device", "virtio-net,netdev=user.0", "-name", "centos-vm", "-netdev", "user,id=user.0,hostfwd=tcp::3397-:22", "-cdrom", "/home/****/packer.io/configs/centos7/packer_cache/2c14e2204a6adb446f541f4437d9540f0972ed66637769c6527aea0242ec540f.iso", "-m", "512M", "-drive", "file=builds/centos-vm,if=virtio,cache=writeback,discard=ignore,format=qcow2", "-boot", "once=d", "-display", "sdl"}
2019/01/16 13:32:11 packer: 2019/01/16 13:32:11 Started Qemu. Pid: 50389
2019/01/16 13:32:11 packer: 2019/01/16 13:32:11 Qemu stderr:
2019/01/16 13:32:11 packer: 2019/01/16 13:32:11 Qemu stderr: (process:50389): GLib-WARNING **: 13:32:11.276: gmem.c:489: custom memory allocation vtable not supported
2019/01/16 13:32:11 packer: 2019/01/16 13:32:11 Qemu stderr: Could not initialize SDL(No available video device) - exiting
2019/01/16 13:32:11 ui error: ==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.

rpm -qa |grep ^qemu
qemu-system-x86-2.0.0-1.el7.6.x86_64
qemu-img-1.5.3-160.el7.x86_64
qemu-kvm-1.5.3-160.el7.x86_64
qemu-common-2.0.0-1.el7.6.x86_64
qemu-kvm-common-1.5.3-160.el7.x86_64

System is RHEL 7.6

Comment 1 oarribas 2019-05-07 09:42:46 UTC
You can use "qemu-kvm" instead of "qemu-system" (which is not in RHEL repositories).
To do that, change the "qemu_binary" (https://www.packer.io/docs/builders/qemu.html#qemu_binary) in your "builders":

  "qemu_binary": "/usr/libexec/qemu-kvm"

Also, if the image doesn't have X11 forwarding enabled, you can set "headless": "true"

HTH.

Comment 2 Juha Tuomala 2022-06-01 09:20:47 UTC
# QEMU_AUDIO_DRV=none  qemu-system-arm -cpu arm1176 -m 2048 -M versatilepb -no-reboot -serial stdio  -hda XXXXXXXX/venus-image-raspberrypi2-20220418134727-v2.85.rootfs.wic -net nic -net user -vnc :5009  -net tap,ifname=vnet20,script=no,downscript=no 

(process:8389): GLib-WARNING **: 12:12:26.842: gmem.c:489: custom memory allocation vtable not supported
qemu: fatal: Trying to execute code outside RAM or ROM at 0x10000000

R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=10000000
PSR=400001d3 -Z-- A svc32
s00=00000000 s01=00000000 d00=0000000000000000
s02=00000000 s03=00000000 d01=0000000000000000
s04=00000000 s05=00000000 d02=0000000000000000
s06=00000000 s07=00000000 d03=0000000000000000
s08=00000000 s09=00000000 d04=0000000000000000
s10=00000000 s11=00000000 d05=0000000000000000
s12=00000000 s13=00000000 d06=0000000000000000
s14=00000000 s15=00000000 d07=0000000000000000
s16=00000000 s17=00000000 d08=0000000000000000
s18=00000000 s19=00000000 d09=0000000000000000
s20=00000000 s21=00000000 d10=0000000000000000
s22=00000000 s23=00000000 d11=0000000000000000
s24=00000000 s25=00000000 d12=0000000000000000
s26=00000000 s27=00000000 d13=0000000000000000
s28=00000000 s29=00000000 d14=0000000000000000
s30=00000000 s31=00000000 d15=0000000000000000
FPSCR: 00000000


This is CentOS7.


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