hvf accelerator crashes on quest boot

Bug #1815263 reported by Nathan Wallace
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

Host OS: macOS High Sierra (10.13.6)
MacBook Pro (Retina, Mid 2015)
Processor: 2.8GHz Intel Core i7
Guest OS: OpenBSD 6.4 install media (install64.iso)
Qemu 3.1.0 release, built with:
./configure --prefix=/usr/local/Cellar/qemu/3.1.0_1 --cc=clang
      --host-cc=clang
      --disable-bsd-user
      --disable-guest-agent
      --enable-curses
      --enable-libssh2
      --enable-vde
      --extra-cflags=-DNCURSES_WIDECHAR=1
      --enable-cocoa
      --disable-sdl
      --disable-gtk
      --enable-hvf
      --target-list=x86_64-softmmu
      --enable-debug

I invoke qemu like this:
Last command had exit code: 0 at 22:58
nwallace@nwallace-ltm3:~
$ sudo qemu-system-x86_64 -M accel=hvf -boot d -cdrom ~/Downloads/install64.iso
Password:
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
bad size

Abort trap: 6
Last command had exit code: 134 at 22:58
nwallace@nwallace-ltm3:~
$

I ran qemu in lldb to get a stack trace and I get:
Last command had exit code: 0 at 22:54
nwallace@nwallace-ltm3:~/Downloads
$ sudo lldb -- qemu-system-x86_64 -M accel=hvf -boot d -cdrom /Users/nwallace/Downloads/install64.iso
Password:
(lldb) target create "qemu-system-x86_64"
Current executable set to 'qemu-system-x86_64' (x86_64).
(lldb) settings set -- target.run-args "-M" "accel=hvf" "-boot" "d" "-cdrom" "/Users/nwallace/Downloads/install64.i
so"
(lldb) run
Process 96474 launched: '/usr/local/bin/qemu-system-x86_64' (x86_64)
Process 96474 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGUSR2
    frame #0: 0x00007fff5ef0c00a libsystem_kernel.dylib`__sigsuspend + 10
libsystem_kernel.dylib`__sigsuspend:
-> 0x7fff5ef0c00a <+10>: jae 0x7fff5ef0c014 ; <+20>
    0x7fff5ef0c00c <+12>: movq %rax, %rdi
    0x7fff5ef0c00f <+15>: jmp 0x7fff5ef02b0e ; cerror
    0x7fff5ef0c014 <+20>: retq
Target 0: (qemu-system-x86_64) stopped.
(lldb) process handle SIGUSR1 -n true -p true -s false
NAME PASS STOP NOTIFY
=========== ===== ===== ======
SIGUSR1 true false true
(lldb) process handle SIGUSR2 -n true -p true -s false
NAME PASS STOP NOTIFY
=========== ===== ===== ======
SIGUSR2 true false true
(lldb) c
Process 96474 resuming
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
Process 96474 stopped and restarted: thread 9 received signal: SIGUSR2
<line above repeats about 64 times or so>
Process 96474 stopped and restarted: thread 9 received signal: SIGUSR2
bad size

Process 96474 stopped
* thread #9, stop reason = signal SIGABRT
    frame #0: 0x00007fff5ef0bb66 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7fff5ef0bb66 <+10>: jae 0x7fff5ef0bb70 ; <+20>
    0x7fff5ef0bb68 <+12>: movq %rax, %rdi
    0x7fff5ef0bb6b <+15>: jmp 0x7fff5ef02ae9 ; cerror_nocancel
    0x7fff5ef0bb70 <+20>: retq
Target 0: (qemu-system-x86_64) stopped.
(lldb) bt
* thread #9, stop reason = signal SIGABRT
  * frame #0: 0x00007fff5ef0bb66 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5f0d6080 libsystem_pthread.dylib`pthread_kill + 333
    frame #2: 0x00007fff5ee671ae libsystem_c.dylib`abort + 127
    frame #3: 0x000000010016b6ec qemu-system-x86_64`exec_cmps_single + 400
    frame #4: 0x000000010016ada4 qemu-system-x86_64`exec_cmps + 65
    frame #5: 0x0000000100169aaa qemu-system-x86_64`exec_instruction + 48
    frame #6: 0x0000000100164eb2 qemu-system-x86_64`hvf_vcpu_exec + 2658
    frame #7: 0x000000010005bed6 qemu-system-x86_64`qemu_hvf_cpu_thread_fn + 200
    frame #8: 0x00000001003ee531 qemu-system-x86_64`qemu_thread_start + 107
    frame #9: 0x00007fff5f0d3661 libsystem_pthread.dylib`_pthread_body + 340
    frame #10: 0x00007fff5f0d350d libsystem_pthread.dylib`_pthread_start + 377
    frame #11: 0x00007fff5f0d2bf9 libsystem_pthread.dylib`thread_start + 13
(lldb) quit
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] Y
Last command had exit code: 0 at 23:01
nwallace@nwallace-ltm3:~/Downloads
$

I'm happy to work with someone more knowledgeable to reproduce this issue and provide debugging assistance as I'm able.

Tags: hvf Edit Tag help
tags: added: hvf
Revision history for this message
Thomas Huth (th-huth) wrote :

Looking through old bug tickets... is this still an issue with the latest version of QEMU? Or could we close this ticket nowadays?

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers