Skip to contentSkip to conversation

Segmentation fault if started without -enable-kvm parameter

Qemu-devel Bug Reporter 2 participants 5 messages Feb 20, 2011 – Sep 8, 2016

lore
Share & tools
lore
#0 lore raw

Public bug reported:

I start qemu (Linux) from the same USB memory stick on several computers. Up to and including qemu 0.12.5, I could use or not use qemu's "-enable-kvm" command line parameter as appropriate for the hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0 segfault if started without "-enable-kvm". I get a black window appearing for fractions of a second, disappearing immediately, and then the error message "Segmentation fault".

Hardware: Pentium 4, and Core 2 Duo.
Command line: either "qemu" or "qemu -enable-kvm" (after manually loading the kvm-intel module on the Core 2 Duo).
Reproducible: always.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 22 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/722311

Title:
  Segmentation fault if started without -enable-kvm parameter

Status in QEMU:
  New

Bug description:
  I start qemu (Linux) from the same USB memory stick on several
  computers. Up to and including qemu 0.12.5, I could use or not use
  qemu's "-enable-kvm" command line parameter as appropriate for the
  hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0
  segfault if started without "-enable-kvm". I get a black window
  appearing for fractions of a second, disappearing immediately, and
  then the error message "Segmentation fault".

  Hardware: Pentium 4, and Core 2 Duo.
  Command line: either "qemu" or "qemu -enable-kvm" (after manually loading the kvm-intel module on the Core 2 Duo).
  Reproducible: always.
#1 lore raw
Quoted 9 lines · Bug Reporter

Public bug reported:

I start qemu (Linux) from the same USB memory stick on several computers. Up to and including qemu 0.12.5, I could use or not use qemu's "-enable-kvm" command line parameter as appropriate for the hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0 segfault if started without "-enable-kvm". I get a black window appearing for fractions of a second, disappearing immediately, and then the error message "Segmentation fault".

Stack backtrace, please!

If you don't know how to capture it, ask for assistance.

#2 lore raw
In reply to Bug Reporter

It is a bit weird that www.qemu.org tells me to report my bugs on launchpad, but replies to my bug report then appear ONLY on the developer mailing list. How shall a lowly end-user know that he must look there, too?

Anyway. On the developer mailing list, Markus Armbruster (Mon, 21 Feb 2011 09:00:25 +0100) requested:

Quoted 1 line

Stack backtrace, please!

When recompiling qemu 0.14.0 with "--enable-debug" for that purpose I also played a bit with the CFLAGS. It turns out that qemu segfaults when compiled with "-Os" in the CFLAGS, but not when compiled without "-O<whatever>" in the CFLAGS. The GCC version is 4.5.2.

I have now probably lost the audience. But nevermind, here is the stack backtrace from qemu compiled with "-Os":

root [~/sandbox] gdb qemu
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/qemu...done.
(gdb) r
Starting program: /usr/bin/qemu
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault. raise_interrupt (intno=13, is_int=0, error_code=8, next_eip_addend=0)

    at /root/sandbox/stage4/qemu-0.14.0/target-i386/op_helper.c:1340
1340	    env->exception_index = intno;
(gdb) bt
#0  raise_interrupt (intno=13, is_int=0, error_code=8, next_eip_addend=0)
    at /root/sandbox/stage4/qemu-0.14.0/target-i386/op_helper.c:1340
#1  0x08146e13 in raise_exception_err (exception_index=13, error_code=8)
    at /root/sandbox/stage4/qemu-0.14.0/target-i386/op_helper.c:1351

#2 0xda9abe00 in ?? ()
#3 0x00000000 in ?? ()
(gdb)

and for comparison, the stack backtrace after compiling qemu with no CFLAGS at all:

root [~/sandbox] gdb qemu
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/qemu...done.
(gdb) r
Starting program: /usr/bin/qemu
[Thread debugging using libthread_db enabled]

Program exited normally.
(gdb) bt
No stack.
(gdb)

Signature · 22 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/722311

Title:
  Segmentation fault if started without -enable-kvm parameter

Status in QEMU:
  New

Bug description:
  I start qemu (Linux) from the same USB memory stick on several
  computers. Up to and including qemu 0.12.5, I could use or not use
  qemu's "-enable-kvm" command line parameter as appropriate for the
  hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0
  segfault if started without "-enable-kvm". I get a black window
  appearing for fractions of a second, disappearing immediately, and
  then the error message "Segmentation fault".

  Hardware: Pentium 4, and Core 2 Duo.
  Command line: either "qemu" or "qemu -enable-kvm" (after manually loading the kvm-intel module on the Core 2 Duo).
  Reproducible: always.
#3 lore raw
In reply to Bug Reporter

The problem reported above was the same up to and including qemu 0.15.0. Meanwhile I found this on the LinuxFromScratch (LFS) bug tracker:

"Glibc-2.14 causes segfaults in SDL",
http://wiki.linuxfromscratch.org/lfs/ticket/2920

After applying their patch to GLIBC, qemu finally works again on the Pentium 4. As far as I am concerned, this bug report can now be closed.

** Bug watch added: Linux From Scratch Trac #2920
http://wiki.linuxfromscratch.org/lfs/ticket/2920

Signature · 25 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/722311

Title:
  Segmentation fault if started without -enable-kvm parameter

Status in QEMU:
  New

Bug description:
  I start qemu (Linux) from the same USB memory stick on several
  computers. Up to and including qemu 0.12.5, I could use or not use
  qemu's "-enable-kvm" command line parameter as appropriate for the
  hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0
  segfault if started without "-enable-kvm". I get a black window
  appearing for fractions of a second, disappearing immediately, and
  then the error message "Segmentation fault".

  Hardware: Pentium 4, and Core 2 Duo.
  Command line: either "qemu" or "qemu -enable-kvm" (after manually loading the kvm-intel module on the Core 2 Duo).
  Reproducible: always.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/722311/+subscriptions
author
#4 lore raw
In reply to Bug Reporter

Closing bug according to comment #2

** Changed in: qemu
Status: New => Fix Released

Signature · 25 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/722311

Title:
  Segmentation fault if started without -enable-kvm parameter

Status in QEMU:
  Fix Released

Bug description:
  I start qemu (Linux) from the same USB memory stick on several
  computers. Up to and including qemu 0.12.5, I could use or not use
  qemu's "-enable-kvm" command line parameter as appropriate for the
  hardware, and qemu would run. In contrast, qemu 0.13.0 and 0.14.0
  segfault if started without "-enable-kvm". I get a black window
  appearing for fractions of a second, disappearing immediately, and
  then the error message "Segmentation fault".

  Hardware: Pentium 4, and Core 2 Duo.
  Command line: either "qemu" or "qemu -enable-kvm" (after manually loading the kvm-intel module on the Core 2 Duo).
  Reproducible: always.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/722311/+subscriptions