FS#60566 - [libvirt] new virtual machines crash with kernel panic at init_amd

Attached to Project: Community Packages
Opened by George Angelopoulos (gangelop) - Tuesday, 23 October 2018, 17:10 GMT
Last edited by Christian Rebischke (Shibumi) - Tuesday, 09 April 2019, 21:58 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description
-----------

[ 0.045459] divide error: 0000 [#1] SMP
[ 0.046000] Modules linked in:
[ 0.046000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-862.el7.x86_64 #1
[ 0.046000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014
[ 0.046000] task: ffffffff99816480 ti: ffffffff99800000 task.ti: ffffffff99800000
[ 0.046000] RIP: 0010:[<ffffffff98c40145>] [<ffffffff98c40145>] init_amd+0x225/0x8c0
[ 0.046000] RSP: 0000:ffffffff99803e50 EFLAGS: 00010246
[ 0.046000] RAX: 0000000000000000 RBX: ffffffff99934f00 RCX: 0000000000000000
[ 0.046000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff99803e68
[ 0.046000] RBP: ffffffff99803ec8 R08: 0000000000000040 R09: ffffffff99803e70
[ 0.046000] R10: ffffffff99803e74 R11: 0000000000000000 R12: ffffffff99934f22
[ 0.046000] R13: 0000000000000040 R14: 000000000000e018 R15: 0000000000000000
[ 0.046000] FS: 0000000000000000(0000) GS:ffff8df23c800000(0000) knlGS:0000000000000000
[ 0.046000] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 0.046000] CR2: 00000000ffffffff CR3: 000000003720e000 CR4: 00000000000406b0
[ 0.046000] Call Trace:
[ 0.046000] [<ffffffff98c3de02>] identify_cpu+0x1c2/0x4c0
[ 0.046000] [<ffffffff9997abbb>] identify_boot_cpu+0x10/0xa9
[ 0.046000] [<ffffffff9997ac86>] check_bugs+0x1d/0x178
[ 0.046000] [<ffffffff98d4e0fe>] ? __delayacct_tsk_init+0x1e/0x40
[ 0.046000] [<ffffffff9996c198>] start_kernel+0x41d/0x467
[ 0.046000] [<ffffffff9996bb7b>] ? repair_env_string+0x5c/0x5c
[ 0.046000] [<ffffffff9996b120>] ? early_idt_handler_array+0x120/0x120
[ 0.046000] [<ffffffff9996b72f>] x86_64_start_reservations+0x24/0x26
[ 0.046000] [<ffffffff9996b885>] x86_64_start_kernel+0x154/0x177
[ 0.046000] [<ffffffff98c000d5>] start_cpu+0x5/0x14
[ 0.046000] Code: 83 f8 01 76 2f f0 80 4b 23 08 80 3b 16 77 25 0f b7 83 f0 00 00 00 31 d2 0f b7 b3 fc 00 00 00 f7 35 25 c5 be 00 31 d2 89 c1 89 f0 <f7> f1 66 89 93 fc 00 00 00 65 44 8b 2d c6 de 3c 67 44 89 ef 44
[ 0.046000] RIP [<ffffffff98c40145>] init_amd+0x225/0x8c0
[ 0.046000] RSP <ffffffff99803e50>
[ 0.046011] ---[ end trace f68728a0d3053b52 ]---
[ 0.048006] Kernel panic - not syncing: Fatal exception

Additional info
---------------

version: libvirt 4.8.0-2
see attachment "console-bugtest3" for full console output.
Host is AMD, see attached /proc/cpuinfo for host.

Might be related to RHEL bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1619166
Haven't found any relevant libvirt bugzillas at this point.

Steps to reproduce
------------------
1. Create a new QEMU/KVM virtual machine.
2. Boot an operating system. I used RHEL7.5 among others.
3. Enjoy the kernel panic.

Workaround
----------
Edit the virtual machine with "sudo virsh edit vm_name" and change the following lines.
Not sure which change is the important one.

$ diff dumpxml-bad dumpxml-good
20,21c20,21
< <cpu mode='host-model' check='partial'>
< <model fallback='allow'/>
---
> <cpu mode='custom' match='exact' check='partial'>
> <model fallback='allow'>Opteron_G5</model>
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Tuesday, 09 April 2019, 21:58 GMT
Reason for closing:  No response
Comment by George Angelopoulos (gangelop) - Tuesday, 23 October 2018, 17:12 GMT
attachments
Comment by Doug Newgard (Scimmia) - Sunday, 04 November 2018, 00:44 GMT
Sounds like a problem with the kernel you're booting
Comment by George Angelopoulos (gangelop) - Sunday, 04 November 2018, 01:54 GMT
It's not. What exactly makes you think that?
Comment by George Angelopoulos (gangelop) - Sunday, 04 November 2018, 02:00 GMT
I've tried several different versions of RHEL7, an existing RHEL7 VM with the same kernel worked just fine. Only new vms stopped working. Old machines were working with the aforementioned good cpu configuration in libvirt. The default configuration for the new ones doesn't work. If anything, I suspect it's related to my physical cpu, considering it's failing at init_amd which sounds specific to AMD. I'm quite sure it started after a certain update on the Arch Linux host but haven't spent time to find out which one.
Comment by Christian Rebischke (Shibumi) - Wednesday, 07 November 2018, 08:16 GMT
libvirt 4.9.0 is in testing. Please install it and verify if your bug still exists
Comment by George Angelopoulos (gangelop) - Wednesday, 07 November 2018, 08:39 GMT
Just tested libvirt-4.9.0. No change.
Comment by Christian Rebischke (Shibumi) - Wednesday, 07 November 2018, 15:33 GMT
Hello George,

can you report this bug upstream at the libvirt bugtracker? I am pretty sure it has nothing to do with our package and is something very libvirt specific.
Comment by George Angelopoulos (gangelop) - Wednesday, 14 November 2018, 09:01 GMT
Yes, I will report it eventually. Have been busy.
Comment by Christian Rebischke (Shibumi) - Saturday, 09 February 2019, 14:17 GMT
Does this bug still exist with libvirt version 5.0.0?

Loading...