qemu segfaults instantly

Bug #425923 reported by Sam Liddicott
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: qemu

$ lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10
qemu-kvm version: 0.11.0~rc1-0ubuntu11
$ qemu --version
QEMU PC emulator version 0.10.91 (qemu-kvm-0.11.0-rc1), Copyright (c) 2003-2008 Fabrice Bellard

sam@lazarus:~$ sudo modprobe kqemu
sam@lazarus:~$ sudo qemu /dev/sda
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
Segmentation fault (core dumped)

A black window pops up and then goes away with a segfault reported on the console.

The end of strace is:
clock_gettime(CLOCK_MONOTONIC, {37546, 912898268}) = 0
brk(0x86b6000) = 0x86b6000
brk(0x86f2000) = 0x86f2000
clock_gettime(CLOCK_MONOTONIC, {37546, 914351127}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 914423423}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 914489761}) = 0
timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 250000}}, NULL) = 0
select(6, [3 5], [], [], {0, 0}) = 1 (in [3], left {0, 0})
read(3, "\0", 512) = 1
--- SIGALRM (Alarm clock) @ 0 (0) ---
write(4, "\0", 1) = 1
sigreturn() = ? (mask now [USR2])
read(3, "\0", 512) = 1
read(3, 0xbfab363c, 512) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {37546, 915294679}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 915362487}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 915425172}) = 0
timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 250000}}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 915633024}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 915696981}) = 0
poll([{fd=7, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=7, revents=POLLOUT}])
--- SIGALRM (Alarm clock) @ 0 (0) ---
write(4, "\0", 1) = 1
sigreturn() = ? (mask now [USR2])
writev(7, [{"\22\0\7\0\3\0\340\4'\0\0\0\37\0\0\0\10\1\4\0\4\0\0\0QEMU\22\0\7\0"..., 116}, {NULL, 0}, {"", 0}], 3) = 116
poll([{fd=7, events=POLLIN}], 1, -1) = 1 ([{fd=7, revents=POLLIN}])
read(7, "\34\277z\0\3\0\340\4'\0\0\0\244\353<\2\0{\23\10\360\374i\t\4\0\0\0\0\0\0@"..., 4096) = 160
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(8, [7], NULL, NULL, {0, 0}) = 0 (Timeout)
read(7, 0x85a1190, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(8, [7], NULL, NULL, {0, 0}) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {37546, 918654509}) = 0
select(6, [3 5], [], [], {0, 0}) = 1 (in [3], left {0, 0})
read(3, "\0", 512) = 1
read(3, 0xbfab363c, 512) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {37546, 918983058}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919051008}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919113840}) = 0
timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 22763000}}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919339625}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919400911}) = 0
select(6, [3 5], [], [], {0, 0}) = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {37546, 919575878}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919640243}) = 0
clock_gettime(CLOCK_MONOTONIC, {37546, 919704052}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++

Revision history for this message
Eddie Hung (eddieh) wrote :

Can confirm on latest Karmic, simply running qemu returns a segfault on AMD64. No debugging symbols in repo, so will try building from source to get a backtrace.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

If you can build from source - I can't, see bug: 425923

However passing "-no-kvm" option to qemu works.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

I meant: see bug #425947 about not building

Revision history for this message
Eddie Hung (eddieh) wrote :

Building from source works for me in AMD64, but now I can't reproduce the bug.
However, it was not before dpkg-gencontrol bailed because qemu-arm-static did not support amd64, so I simply added it to debian/control and then it built just fine.
I don't have vmx so I can't seem to use the kvm module though...

Revision history for this message
Eddie Hung (eddieh) wrote :

Hang on, what I built was a more modern version than the one I had previously, changelog:

qemu-kvm (0.11.0~rc1-0ubuntu13) karmic; urgency=low

  * debian/qemu-kvm.udev: add udev file which was dropped during the
    packaging, LP: #422225
  * debian/patches/04_fix-no-kvm-segfault.patch: fix segfault when
    KVM is not available, by ensuring that kvm_allowed gets set
    earlier enough in vl.c; will be sent upstream; LP: #422295

Revision history for this message
Eddie Hung (eddieh) wrote :

Ok, can confirm -no-kvm switch works on the latest version in my repo: 0.11.0~rc1-0ubuntu11, and that I'm not using kvm. Marking as duplicate of bug #422295, correct me if I'm wrong.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 425923] Re: qemu segfaults instantly

Thanks for the bug triaging. Definitely a duplicate. I uploaded a
fix last week. Please update to the latest packages in karmic, this
should be fixed. I'm discussing the long term fix on the kvm@ and
qemu@ upstream mailing lists, if you're interested.

:-Dustin

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

Thanks, eddie

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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