Project

General

Profile

Bug #9761

Starting VM (KVM/Virtualbox) Causes panic since July

Added by Till Wegmüller about 1 year ago. Updated 9 months ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
kernel
Start date:
2018-08-22
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hello Since July starting a VM be that Virtualbox or KVM causes the Host to panic witht the following stack

We now have multiple people affected by this see oi-discuss mailing list topic "VirtualBox 5.2.14 crashing when attempting to start VM"

Workarounds tried:
disable_smap in /etc/system
kpti=0 in /boo/conf.d/kpti

Stacktrace:
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci zfs sata sd ip hook neti sockfs arp usba i915 xhci mm fctl stmf stmf_sbd lofs idm random crypto sppp cpc fcip ufs logindmux ptm nfs kvm ipc ]

::status

debugging crash dump vmcore.1 (64-bit) from node02
operating system: 5.11 illumos-49714e869e (i86pc)
image uuid: feb7f2c3-e39d-ca14-8e47-e73ffc114e13
panic message: BAD TRAP: type=7 (#nm Device not available) rp=ffffff0020aa0300 addr=ffffff0020aa0ea8
dump content: kernel pages only

::stack

kvm_fx_finit()
vmx_vcpu_reset+0x97()
kvm_arch_vcpu_reset+0x6c()
kvm_arch_vcpu_setup+0x28()
kvm_vm_ioctl_create_vcpu+0x44()
kvm_ioctl+0xa2c()
cdev_ioctl+0x39(11100000002, 2000ae41, 0, 202003, ffffff06dd2df6e8, ffffff0020aa0ea8)
spec_ioctl+0x60(ffffff06dcc1aa00, 2000ae41, 0, 202003, ffffff06dd2df6e8, ffffff0020aa0ea8)
fop_ioctl+0x55(ffffff06dcc1aa00, 2000ae41, 0, 202003, ffffff06dd2df6e8, ffffff0020aa0ea8)
ioctl+0x9b(e, 2000ae41, 0)
sys_syscall+0x177()

Due to the timing of the Issue we were suspecting the Following changes as culprit but are not knowledgeable enough about the code to confirm this:

I think it might be the "eager FPU" changes which landed in illumos-gate on June 13th:

https://github.com/illumos/illumos-gate/commit/4c28a617e3922d92a58e813a5b955eb526b9c386
https://github.com/illumos/illumos-gate/commit/a32a1f376ed9360264e4a374608fdcc5c4927d63

It's reported to the authors of those patches at https://github.com/joyent/smartos-live/issues/792.


Related issues

Related to OpenIndiana Distribution - Bug #9752: Updated openindiana (per 20180817) panics when starting VM from Virtualbox 5.2.18Resolved2018-08-17

Actions

History

#1

Updated by Alexander Pyhalov about 1 year ago

Stack trace from host PC when VirtualBox VM is launched:

vpanic()
rw_panic+0x54(fffffffffb96c5a7, ffffff03e70e8928)
rw_enter_sleep+0x37a(ffffff03e70e8928, 2)
as_fault+0x1f1(ffffff03e6bdf188, ffffff03e70e88f8, fffffd7feefb0010, 1, 0, 1)
pagefault+0x96(fffffd7feefb0010, 0, 1, 0)
trap+0xd88(ffffff001098d740, fffffd7feefb0010, 0)
cmntrap_pushed+0x3c()
rtR0SegVBoxSolCreate+0x91()
as_map_locked+0x1a4(ffffff03e70e88f8, fffffd7feefb0000, 1000, fffffffff81624b0, ffffff001098da20)
as_map+0x58(ffffff03e70e88f8, fffffd7feefb0000, 1000, fffffffff81624b0, ffffff001098da20)
rtR0MemObjNativeMapUser+0x28f()
RTR0MemObjMapUserTag+0x154()
SUPR0GipMap+0x138()
supdrvIOCtl+0x2e7c()
VBoxDrvSolarisIOCtl+0x375()
cdev_ioctl+0x39(13000000002, c0185694, fffffd7fffdfe520, 202003, ffffff03e761c820, ffffff001098dea8)
spec_ioctl+0x60(ffffff03ea216600, c0185694, fffffd7fffdfe520, 202003, ffffff03e761c820, ffffff001098dea8)
fop_ioctl+0x55(ffffff03ea216600, c0185694, fffffd7fffdfe520, 202003, ffffff03e761c820, ffffff001098dea8)
ioctl+0x9b(15, ffffffffc0185694, fffffd7fffdfe520)
sys_syscall+0x177()

#2

Updated by Gergő Mihály Doma about 1 year ago

  • Related to Bug #9752: Updated openindiana (per 20180817) panics when starting VM from Virtualbox 5.2.18 added
#3

Updated by Alexander Pyhalov about 1 year ago

The fix for KVM is integrated and should land soon https://github.com/OpenIndiana/oi-userland/commit/620e42a5024070a4653c325f9003e901946db706 . The issue with VirtualBox is more serious - we need to rebuilt it and use similar logic.

#4

Updated by Michal Nowak about 1 year ago

Till, can you confirm that with the latest updates to the OpenIndiana kvm module the problem went away? For the VirtualBox crash, there's a separate bug, so if KVM is fixed, we should close this.

#5

Updated by Olaf Bohlen about 1 year ago

I updated to recent bits (few minutes ago) and qemu-kvm does not crash the kernel anymore. Thank you very much.

#6

Updated by Till Wegmüller about 1 year ago

I can confirm that the Patch fixes the Problem for KVM.

Thank you

#7

Updated by Predrag Zečević 12 months ago

Also, I confirm that KVM works fine...
See: https://wiki.openindiana.org/oi/7.3+KVM#id-73KVM-Freshexample

My OI:

$ uname -rosv
SunOS 5.11 illumos-35b5a2ef2c illumos

Thanks and best regards.

#8

Updated by Alexander Pyhalov 9 months ago

  • Status changed from New to Resolved

Now we ship pkg: , which is usable on latest OI.

Also available in: Atom PDF