Bug 683333

Summary: Core dump occurs when start VM with mem much larger than host's mem
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: lcapitulino, michen, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-11 14:07:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mike Cao 2011-03-09 06:57:39 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.148.el6.x86_64
# uname -r
2.6.32-118.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.find a 10GB or less memory host
2.start VM with 200GB mem
eg:<commandLine> -m 200G
  
Actual results:
Failed to allocate 549755813888 B: Cannot allocate memory
Aborted (core dumped)

Expected results:
qemu-kvm process quit w/o core dump

Additional info:
(gdb) bt
#0  0x00000036158329e5 in raise () from /lib64/libc.so.6
#1  0x00000036158341c5 in abort () from /lib64/libc.so.6
#2  0x0000000000482929 in qemu_memalign (alignment=2097152, size=549755813888)
    at osdep.c:112
#3  0x00000000004eaed9 in qemu_ram_alloc (dev=<value optimized out>, 
    name=<value optimized out>, size=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/exec.c:2724
#4  0x000000000045239e in pc_init1 (ram_size=3758096384, 
    boot_device=0x7fff42df25b0 "c", kernel_filename=0x0, 
    kernel_cmdline=0x63bf42 "", initrd_filename=0x0, 
    cpu_model=0x62bce1 "cpu64-rhel6", pci_enabled=1)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pc.c:1111
#5  0x000000000040e541 in 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:6649

Comment 2 Luiz Capitulino 2011-03-11 14:07:23 UTC
That's the expected behavior. The core is generated because the code calls abort() and not because of a segfault.

Closing as NOTABUG.