qemu-system-x86_64 segfaults if using -no-kvm with -m 4096 or greater

Bug #602539 reported by Rich on 2010-07-07
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Low
Serge Hallyn
Lucid
Undecided
Unassigned

Bug Description

Binary package hint: qemu-kvm

Latest Ubuntu 10.04 amd64.

I have a FreeBSD guest I had running quite slowly with the kvm-intel module loaded, so I shut down the guest, and passed the -no-kvm flag to kvm.

Much to my surprise, I experienced an immediate segmentation fault:
$ qemu-system-x86_64 -no-kvm -vnc :0 -hda fbsd_dev -m 4096
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
Segmentation fault (core dumped)

In contrast:
$ qemu-system-x86_64 -no-kvm -vnc :0 -hda fbsd_dev -m 4095
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
[runs happily forever]

I'm presuming this is some mishandled behavior of qemu having a limit of memory being < 4096m when not using VT bits or somesuch, but it was quite disruptive, and it didn't occur to me to try varying the memory amount for most of a day.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: qemu-kvm 0.12.3+noroms-0ubuntu9
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Jul 7 00:32:52 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: Dell Inc. Precision WorkStation T5500
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic root=/dev/mapper/root-slash ro quiet splash
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: qemu-kvm
dmi.bios.date: 04/12/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A05
dmi.board.name: 0CRH6C
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 7
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA05:bd04/12/2010:svnDellInc.:pnPrecisionWorkStationT5500:pvr:rvnDellInc.:rn0CRH6C:rvrA00:cvnDellInc.:ct7:cvr:
dmi.product.name: Precision WorkStation T5500
dmi.sys.vendor: Dell Inc.

IMPACT: Specifying too much memory for guest causes a segfault instead of an
error message.

FIX: A patch, taken from upstream, which detects the error condition and prints
an error message (and exits) instead of continuing and segfaulting.

PATCH: can be seen at
https://code.launchpad.net/~serge-hallyn/ubuntu/lucid/qemu-kvm/fix-4096/+merge/29592

TO REPRODUCE: see the detailed incantation above.

REGRESSION POTENTIAL: Only one location in the code is patched, and simply
 catches the pathological condition. There should be no regression.

Rich (rincebrain) wrote :
Rich (rincebrain) wrote :

I find the following note in the changelog for qemu 0.12.4:
 - Fix segfault with ram_size > 4095M without kvm (Ryan Harper)

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Serge Hallyn (serge-hallyn) wrote :

Thanks you for reporting this bug and helping to make Ubuntu better. And
thanks especially for finding the specific patch.

This patch should probably get cherry-picked into the lucid qemu-kvm
version. I've set importance to low since the fix is to refuse the
disallowed arguments.

Changed in qemu-kvm (Ubuntu):
milestone: none → lucid-updates
assignee: nobody → Serge Hallyn (serge-hallyn)
description: updated
Martin Pitt (pitti) wrote :

SRU ack, please upload. But please fix in maverick, too (preferably first).

Serge Hallyn (serge-hallyn) wrote :

Note that that fix, verbatim, is in v0.12.5 which is currently in
maverick. It is later quietly removed, and ISTR previously confirming
that it had been replaced by a proper fix (but can't find that right now).

So it is fixed in maverick.

Martin Pitt (pitti) wrote :

Closing the maverick task then.

Changed in qemu-kvm (Ubuntu):
milestone: lucid-updates → none
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu-kvm (Ubuntu Lucid):
status: New → Confirmed
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in qemu-kvm (Ubuntu Lucid):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers