Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1010927

Summary: qemu-kvm aborted while set qxl-vga.ram_size=0 in command line
Product: Red Hat Enterprise Linux 6 Reporter: mazhang <mazhang>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, chayang, flang, juzhang, michen, mkenneth, qzhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-24 19:02:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mazhang 2013-09-23 10:02:43 UTC
Description of problem:
Try boot guest with "-global qxl-vga.ram_size=0", qemu-kvm aborted.


Version-Release number of selected component (if applicable):
host:
qemu-kvm-0.12.1.2-2.404.el6.x86_64
kernel-2.6.32-419.el6.x86_64

guest:
RHEL6U5-64

How reproducible:
100%

Steps to Reproduce:
1.cli:
gdb --args /usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-m 4G \
-smp 4,sockets=2,cores=2,threads=1,maxcpus=16 \
-enable-kvm \
-name rhel6u5 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-nodefaults \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga qxl \
-spice port=5900,disable-ticketing \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-drive file=/home/rhel6u5.raw,if=none,id=drive-scsi-disk,format=raw,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0 \
-device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on \
-device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:39:13:2c \
-device virtio-balloon-pci,id=balloon0 \
-global qxl-vga.ram_size=0 

2.
3.

Actual results:
qemu-kvm aborted

Failed to allocate 18446744071562067968 B: Cannot allocate memory

Program received signal SIGABRT, Aborted.
0x00007ffff4c9c925 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install alsa-lib-1.0.22-3.el6.x86_64 celt051-0.5.1.3-0.el6.x86_64 cyrus-sasl-gssapi-2.1.23-13.el6_3.1.x86_64 cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64 cyrus-sasl-md5-2.1.23-13.el6_3.1.x86_64 cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64 db4-4.7.25-18.el6_4.x86_64 dbus-libs-1.2.24-7.el6_3.x86_64 flac-1.2.1-6.1.el6.x86_64 glib2-2.26.1-3.el6.x86_64 glibc-2.12-1.129.el6.x86_64 glusterfs-api-3.4.0.21rhs-1.el6.x86_64 glusterfs-libs-3.4.0.21rhs-1.el6.x86_64 gnutls-2.8.5-10.el6_4.2.x86_64 keyutils-libs-1.4-4.el6.x86_64 krb5-libs-1.10.3-10.el6_4.6.x86_64 libICE-1.0.6-1.el6.x86_64 libSM-1.2.1-2.el6.x86_64 libX11-1.5.0-4.el6.x86_64 libXau-1.0.6-4.el6.x86_64 libXext-1.3.1-2.el6.x86_64 libXi-1.6.1-3.el6.x86_64 libXtst-1.2.1-2.el6.x86_64 libaio-0.3.107-10.el6.x86_64 libasyncns-0.8-1.1.el6.x86_64 libcom_err-1.41.12-18.el6.x86_64 libgcrypt-1.4.5-9.el6_2.2.x86_64 libgpg-error-1.7-4.el6.x86_64 libjpeg-turbo-1.2.1-1.el6.x86_64 libogg-1.1.4-2.1.el6.x86_64 libselinux-2.0.94-5.3.el6_4.1.x86_64 libsndfile-1.0.20-5.el6.x86_64 libtasn1-2.3-3.el6_2.1.x86_64 libuuid-2.17.2-12.14.el6.x86_64 libvorbis-1.2.3-4.el6_2.1.x86_64 libxcb-1.8.1-1.el6.x86_64 nss-softokn-freebl-3.14.3-6.el6.x86_64 openssl-1.0.1e-11.el6.x86_64 pixman-0.26.2-5.el6_4.x86_64 pulseaudio-libs-0.9.21-14.el6_3.x86_64 spice-server-0.12.4-3.el6.x86_64 tcp_wrappers-libs-7.6-57.el6.x86_64 usbredir-0.5.1-1.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) 
(gdb) bt full
#0  0x00007ffff4c9c925 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007ffff4c9e105 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007ffff7e09b98 in qemu_memalign (alignment=2097152, size=18446744071562067968) at /usr/src/debug/qemu-kvm-0.12.1.2/osdep.c:120
        ptr = <value optimized out>
        ret = <value optimized out>
#3  0x00007ffff7e8f303 in qemu_ram_alloc_from_ptr (dev=<value optimized out>, name=<value optimized out>, size=18446744071562067968, host=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/exec.c:2772
        new_block = 0x7ffff876cea0
        block = <value optimized out>
#4  0x00007ffff7f3cebd in vga_common_init (s=0x7ffff9b60dd8, vga_ram_size=-2147483648) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/vga.c:2298
        i = <value optimized out>
        j = <value optimized out>
        v = <value optimized out>
        b = <value optimized out>
#5  0x00007ffff7f6e1d2 in qxl_init_primary (dev=0x7ffff9b5e840) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qxl.c:1956
        qxl = 0x7ffff9b5e840
        vga = 0x7ffff9b60dd8
        ram_size = <value optimized out>
#6  0x00007ffff7dd8066 in pci_qdev_init (qdev=0x7ffff9b5e840, base=0x7ffff82ed800) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pci.c:1528
        pci_dev = 0x7ffff9b5e840
        info = 0x7ffff82ed800
        bus = 0x7ffff87626e0
        devfn = <value optimized out>
        rc = <value optimized out>
        __func__ = "pci_qdev_init"
#7  0x00007ffff7e5b3c8 in qdev_init (dev=0x7ffff9b5e840) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:284
        rc = <value optimized out>
        __PRETTY_FUNCTION__ = "qdev_init"
#8  0x00007ffff7e5b46a in qdev_init_nofail (dev=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:346
        info = 0x7ffff82ed800
#9  0x00007ffff7dd6f64 in pci_create_simple_multifunction (bus=<value optimized out>, devfn=<value optimized out>, multifunction=<value optimized out>, name=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pci.c:1591
        dev = 0x7ffff9b5e840
#10 0x00007ffff7f48574 in pc_init1 (ram_size=3758096384, boot_device=0x7fffffffde30 "cad", kernel_filename=0x0, kernel_cmdline=0x7ffff7f8fa8f "", initrd_filename=0x0, 
    cpu_model=0x7fffffffe388 "SandyBridge", pci_enabled=1) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pc.c:1303
        filename = <value optimized out>
        ret = <value optimized out>
        i = <value optimized out>
        ram_addr = <value optimized out>
        bios_offset = 140737361858576
        option_rom_offset = <value optimized out>
        below_4g_mem_size = 3758096384
        above_4g_mem_size = 536870912
        bios_size = <value optimized out>
        isa_bios_size = <value optimized out>
        pci_bus = 0x7ffff87626e0
---Type <return> to continue, or q <return> to quit---
        piix3_devfn = 8
        cpu_irq = <value optimized out>
        isa_irq = 0x7ffff8762350
        i8259 = <value optimized out>
        isa_irq_state = 0x7ffff875de30
        hd = {0x7fffffffcbb0, 0x7ffff7fad13c, 0x0, 0x7ffff7f8fa8f}
        fd = {0x7fffffffe388, 0x7ffff7f45f34}
        linux_boot = 0
#11 0x00007ffff7dca4e2 in main (argc=51, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6426
        gdbstub_dev = 0x0
        i = <value optimized out>
        snapshot = 0
        linux_boot = 0
        initrd_filename = 0x0
        kernel_filename = 0x0
        kernel_cmdline = 0x7ffff7f8fa8f ""
        boot_devices = "cad", '\000' <repeats 29 times>
        ds = <value optimized out>
        dcl = <value optimized out>
        cyls = 0
        heads = 0
        secs = 0
        translation = 0
        hda_opts = 0x7ffff82ef270
        opts = <value optimized out>
        olist = <value optimized out>
        optind = 51
        optarg = 0x7fffffffe709 "qxl-vga.ram_size=0"
        loadvm = 0x0
        machine = 0x7ffff82e8780
        cpu_model = 0x7fffffffe388 "SandyBridge"
        fds = {0, 0}
        tb_size = 0
        pid_file = 0x0
        incoming = 0x0
        fd = 0
        pwd = 0x0
        chroot_dir = 0x0
        run_as = 0x0
        env = <value optimized out>
        show_vnc_port = 0
        defconfig = <value optimized out>
        defconfig_verbose = <value optimized out>


Expected results:
qemu-kvm quit with warning if not support "-global qxl-vga.ram_size=0".

Additional info:

Comment 2 Ademar Reis 2013-09-24 19:02:07 UTC
This is a corner case that doesn't happen in supported scenarios, so I'm closing as WONTFIX in RHEL.

Gerd: an upstream fix would be very welcome though.

Comment 3 Gerd Hoffmann 2013-09-25 10:27:29 UTC
Doesn't reproduce on upstream.