Bug 1589855

Summary: Today after kernel upgrade stop working KVM
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, bskeggs, ewk, fedora-kernel-kvm, hdegoede, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, labbott, linville, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-13 19:30:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Virtual Manager screenshoot
none
dmesg none

Description Mikhail 2018-06-11 14:20:29 UTC
Created attachment 1450062 [details]
Virtual Manager screenshoot

Description of problem:
Today after kernel upgrade stop working KVM


$ uname -r
4.18.0-0.rc0.git5.1.fc29.x86_64
$ rpm -qa | grep kernel | sort
abrt-addon-kerneloops-2.10.10-1.fc29.x86_64
kernel-4.17.0-0.rc7.git2.1.fc29.x86_64
kernel-4.18.0-0.rc0.git2.1.fc29.x86_64
kernel-4.18.0-0.rc0.git5.1.fc29.x86_64
kernel-core-4.17.0-0.rc7.git2.1.fc29.x86_64
kernel-core-4.18.0-0.rc0.git2.1.fc29.x86_64
kernel-core-4.18.0-0.rc0.git5.1.fc29.x86_64
kernel-headers-4.18.0-0.rc0.git5.1.fc29.x86_64
kernel-modules-4.17.0-0.rc7.git2.1.fc29.x86_64
kernel-modules-4.18.0-0.rc0.git2.1.fc29.x86_64
kernel-modules-4.18.0-0.rc0.git5.1.fc29.x86_64
kernel-modules-extra-4.17.0-0.rc7.git2.1.fc29.x86_64
kernel-modules-extra-4.18.0-0.rc0.git2.1.fc29.x86_64
kernel-modules-extra-4.18.0-0.rc0.git5.1.fc29.x86_64
libreport-plugin-kerneloops-2.9.5-1.fc29.x86_64


Error starting domain: internal error: qemu unexpectedly closed the monitor: ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
2018-06-11T14:16:34.716803Z qemu-system-x86_64: failed to initialize KVM: Cannot allocate memory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1344, in startup
    self._backend.create()
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1068, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
2018-06-11T14:16:34.716803Z qemu-system-x86_64: failed to initialize KVM: Cannot allocate memory

Comment 1 Laura Abbott 2018-06-11 15:07:05 UTC
a) Can you share kernel logs
b) If you boot back into the older kernel does it work?

Comment 2 Mikhail 2018-06-11 15:09:54 UTC
Created attachment 1450094 [details]
dmesg

Comment 3 Mikhail 2018-06-11 15:26:39 UTC
b) yes with kernel 
$ uname -r
4.18.0-0.rc0.git2.1.fc29.x86_64
KVM works as expected.

But there is good news on kernel 4.18.0-0.rc0.git5.1.fc29.x86_64
hardware acceleration for MP4 via vaapi on AMD GPU start works without hangs.
https://bugs.freedesktop.org/show_bug.cgi?id=106430

Comment 4 Laura Abbott 2018-06-12 15:52:23 UTC
There was a revert upstream which should fix the issue. Should be in kernel-4.18.0-0.rc0.git6.1.fc29

Comment 5 Laura Abbott 2018-06-12 16:00:53 UTC
Sorry that should be kernel-4.18.0-0.rc0.git7.1.fc29

Comment 6 Laura Abbott 2018-06-13 19:30:55 UTC
Fix came in from Linus' tree today so I'm going to close this

Comment 7 Mikhail 2018-06-16 08:12:40 UTC
Laura, can i ask you question?
It's normal that after running KVM I saw such locks?


# lslocks -u | grep unknown

Here I am rinning virtual machine in virtual-manager.

# lslocks -u | grep unknown
(unknown)          -1 OFDLCK       READ  0        100        101 /home...
(unknown)          -1 OFDLCK       READ  0        103        103 /home...
(unknown)          -1 OFDLCK       READ  0        201        201 /home...
(unknown)          -1 OFDLCK       READ  0        203        203 /home...