Bug 619168
Summary: | qemu should more clearly indicate internal detection of this host out-of-memory condition at startup.. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | john cooper <john.cooper> | ||||||
Component: | qemu-kvm | Assignee: | john cooper <john.cooper> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 6.1 | CC: | Jes.Sorensen, john.cooper, juzhang, mhlavink, mjenner, mkenneth, nobody, snagar, tburke, virt-maint | ||||||
Target Milestone: | rc | Keywords: | RHELNAK | ||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | abrt_hash:841543466c446020eb7a11ccd0e380be367dcbee | ||||||||
Fixed In Version: | qemu-kvm-0.12.1.2-2.114.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause
In the case of certain memory allocation failures, qemu
exits with only a self inflicted SIGABORT rather than
clearly indicating this cause for failure to the user.
Consequence
Confusion and possible unhappiness on behalf of the
qemu user.
Change
The condition of allocation failure is detected.
Result
A message is emitted clearly indication the failure cause.
|
Story Points: | --- | ||||||
Clone Of: | 612453 | Environment: | |||||||
Last Closed: | 2011-05-19 11:29:07 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 612453 | ||||||||
Bug Blocks: | 580953 | ||||||||
Attachments: |
|
Comment 2
RHEL Program Management
2010-07-28 18:57:46 UTC
I just hit this myself consistently on a system with substantial memory pressure: 4GB total and ~10% free. Launching with -m 1024 the abort triggers faithfully and with -m 512 qemu launches successfully. From the user's perspective of stumbling into this caveat myself it's rather ugly and isn't at a minor usage issue. Providing a clue to the cause of failure is trivial. Dump attached. Patch attached. Still not sure why the about() is in there unless as a debug aid such that a core image exists to help puzzle out the posix_memalign() failure. Although in this case the cause is clear. Odd this apparently hasn't been more widely seen. Likely related not only to memory pressure but perhaps a host memory fragmentation sensitivity as well. Created attachment 443114 [details]
gdb stack trace of abort
Created attachment 443115 [details]
posix_memalign failure patch
Disregard above patch -- already upstream as d2d5adcb58d32e8ac6c168c4c2e72cf0f90dcab0. Reproduced on qemu-kvm-0.12.1.2-2.113.el6.x86_64,when assign to guest memory higher than host free memory,guest aborted without notification. /usr/libexec/qemu-kvm -m 4G -smp 2 -drive file=/root/zhangjunyi/win2008-64bit.img,if=none,id=test,boot=on,cache=none,format=raw,werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -boot c -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:94 -vnc :10 -qmp tcp:0:4445,server,nowait -chardev socket,path=/tmp/amit/test0,server,nowait,id=test0 -chardev socket,path=/tmp/amit/test1,server,nowait,id=test1 -chardev socket,path=/tmp/amit/test2,server,nowait,id=test2 -chardev socket,path=/tmp/amit/test3,server,nowait,id=test3 -chardev socket,path=/tmp/amit/test4,server,nowait,id=test4 -device virtio-serial -device virtconsole,chardev=test0,name=console.0 -device virtserialport,chardev=test1,name=test1 -device virtserialport,chardev=test2,name=test2 -device virtserialport,chardev=test3,name=test3 -device virtserialport,chardev=test4,name=test4 -serial file:/tmp/amit/test-serial.log Aborted Verified on qemu-kvm-0.12.1.2-2.129.el6.x86_64,when assign to guest memory higher than host free memory,guest aborted with message "Failed to allocate 4294967296 B: Cannot allocate memory". #/usr/libexec/qemu-kvm -m 4G -smp 2 -drive file=/root/zhangjunyi/win2008-64bit.img,if=none,id=test,boot=on,cache=none,format=raw,werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -boot c -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:94 -vnc :10 -qmp tcp:0:4445,server,nowait -chardev socket,path=/tmp/amit/test0,server,nowait,id=test0 -chardev socket,path=/tmp/amit/test1,server,nowait,id=test1 -chardev socket,path=/tmp/amit/test2,server,nowait,id=test2 -chardev socket,path=/tmp/amit/test3,server,nowait,id=test3 -chardev socket,path=/tmp/amit/test4,server,nowait,id=test4 -device virtio-serial -device virtconsole,chardev=test0,name=console.0 -device virtserialport,chardev=test1,name=test1 -device virtserialport,chardev=test2,name=test2 -device virtserialport,chardev=test3,name=test3 -device virtserialport,chardev=test4,name=test4 -serial file:/tmp/amit/test-serial.log Failed to allocate 4294967296 B: Cannot allocate memory According to above description,this issue has been fixed. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause In the case of certain memory allocation failures, qemu exits with only a self inflicted SIGABORT rather than clearly indicating this cause for failure to the user. Consequence Confusion and possible unhappiness on behalf of the qemu user. Change The condition of allocation failure is detected. Result A message is emitted clearly indication the failure cause. Added CCFR An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0534.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0534.html |