qemu-system-arm segfaults emulating versatile machine

Bug #584480 reported by Balau
50
This bug affects 14 people
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Fix Released
Medium
Serge Hallyn
Nominated for Lucid by Serge Hallyn
Nominated for Maverick by Serge Hallyn

Bug Description

======================================================
SRU Justification:
1. Impact of bug: qemu segfaults when emulating some arm architectures, unless '-m X' (for some low X) is specified.
2. How was the bug addressed: a patch is added which lowers the default RAM size for ARM architectures.
3. Patch: See the linked sources trees (for lucid and maverick)
4. TEST CASE: 'qemu-system-arm -M versatileab -kernel zImage
5. Regression potential: if there are users whose arm systems require a larger RAM size, they could experience regressions without specifying '-m 356'. This is very unlikely.
======================================================
Binary package hint: qemu-kvm

The following commands close immediately with segmentation fault:
qemu-system-arm -M versatilepb -kernel zImage
qemu-system-arm -M versatileab -kernel zImage

The following does not cause segmentation fault:
qemu-system-arm -M versatilepb -kernel zImage -m 128M
qemu-system-arm -M versatileab -kernel zImage -m 128M

zImage is a linux kernel image for ARM that worked with previous versions of qemu-system-arm, but the error is independent from the -kernel option, because it segfaults using any file.

The option -m 128M should be the default, and in older versions it worked the same with and without it.
---
Architecture: i386
DistroRelease: Ubuntu 10.04
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: qemu-kvm 0.12.3+noroms-0ubuntu9
PackageArchitecture: i386
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.32-22-generic root=/dev/mapper/VolGroup00-root ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Tags: lucid
Uname: Linux 2.6.32-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare svnusers
dmi.bios.date: 10/20/2006
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0804
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5B-Deluxe
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0804:bd10/20/2006:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5B-Deluxe:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Balau (balau82) wrote : BootDmesg.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Balau (balau82) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Balau (balau82) wrote : Dependencies.txt

apport information

Revision history for this message
Balau (balau82) wrote : Lspci.txt

apport information

Revision history for this message
Balau (balau82) wrote : Lsusb.txt

apport information

Revision history for this message
Balau (balau82) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Balau (balau82) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Balau (balau82) wrote : ProcModules.txt

apport information

Revision history for this message
Balau (balau82) wrote : RelatedPackageVersions.txt

apport information

Revision history for this message
Balau (balau82) wrote : UdevDb.txt

apport information

Revision history for this message
Balau (balau82) wrote : UdevLog.txt

apport information

Thierry Carrez (ttx)
Changed in qemu-kvm (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
dungnn (dungtiamo)
description: updated
Revision history for this message
dungnn (dungtiamo) wrote : apport information

Architecture: i386
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: Gigabyte Technology Co., Ltd. G41M-Combo
Package: qemu-kvm 0.12.5+noroms-0ubuntu7.1
PackageArchitecture: i386
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-24-generic root=UUID=1a35591f-ae33-4f18-a053-aa5b039b95dc ro quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Tags: maverick
Uname: Linux 2.6.35-24-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 06/09/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F3
dmi.board.name: G41M-Combo
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF3:bd06/09/2010:svnGigabyteTechnologyCo.,Ltd.:pnG41M-Combo:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnG41M-Combo:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: G41M-Combo
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
dungnn (dungtiamo) wrote : BootDmesg.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : CurrentDmesg.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : Dependencies.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : Lspci.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : Lsusb.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : ProcInterrupts.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : ProcModules.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : RelatedPackageVersions.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : UdevDb.txt

apport information

Revision history for this message
dungnn (dungtiamo) wrote : UdevLog.txt

apport information

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Moving this bug over to the qemu-linaro package, which now provides qemu-system-arm

affects: qemu-kvm (Ubuntu) → qemu-linaro (Ubuntu)
Revision history for this message
Peter Maydell (pmaydell) wrote :

I can confirm that I can reproduce this bug with qemu-kvm-extras 0.12.3+noroms-0ubuntu9 and 0.12.5+noroms-0ubuntu7 but that it is not present in qemu-linaro 2011.02. I used the zImage from
http://ftp.linux.org.uk/pub/linux/arm/fedora/qemu/zImage-versatile-2.6.22 for testing.

The cause of this bug is the Debian specific patch which shipped in the qemu-kvm source package:
debian/patches/larger_default_ram_size.patch

which sets the default RAM size to 384MB. This interacts badly with a bug in the versatilepb model (still present) where it just crashes if you ask it to model more RAM than the maximum theoretical limit for that model (256MB) rather than giving an error message.

That Debian patch doesn't ship with the qemu-linaro package as far as I'm aware.

Revision history for this message
Peter Maydell (pmaydell) wrote :

Moving back to qemu-kvm as specific to that package.

affects: qemu-linaro (Ubuntu) → qemu-kvm (Ubuntu)
Changed in qemu-kvm (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Balau,

could you test with the debs posted in comment #27?

Revision history for this message
Balau (balau82) wrote :

I installed the packages in comment #27 on a Lucid box and qemu-system-arm did _not_ segfault both with versatilepb and versatileab machine emulation.
The bug seems to be solved for me using these packages.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Marking this fix released bc it does not exist in Natty, where arm emulation is strictly done by qemu-linaro)

Changed in qemu-kvm (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Balau. Proceeding with SRU request.

description: updated
tags: added: testcase
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.