#916441 Failed to create /var/lib/libvirt/.cache for shader cache (Permission denied)

Package:
libvirt-daemon
Source:
libvirt
Description:
Virtualization daemon
Submitter:
Laurent Bigonville
Date:
2020-12-28 16:15:02 UTC
Severity:
normal
Tags:
#916441#5
Date:
2018-12-14 13:54:35 UTC
From:
To:
Hi,

When starting a domain with virgl support enabled, qemu complains that
/var/lib/libvirt/.cache doesn't exits.

AFAICS, mesa is using this directory to cache the generated shaders.

Mesa tries this location because it the XDG location for the cache
files. IMVHO, this should be moved to /var/cache/libvirt/ when running a
system domain by setting XDG_CACHE_HOME to that value.

That should maybe be coordinated with upstream first?

Kind regards,

Laurent Bigonville

#916441#12
Date:
2018-12-14 14:25:07 UTC
From:
To:
Hi,

I guess it should. Any chance you can do this?
 -- Guido

#916441#17
Date:
2018-12-20 10:57:17 UTC
From:
To:
Le 14/12/18 à 15:25, Guido Günther a écrit :
I opened https://bugzilla.redhat.com/show_bug.cgi?id=1659484

#916441#22
Date:
2018-12-20 17:12:10 UTC
From:
To:
Hi,

Thanks!
 -- Guido

#916441#27
Date:
2019-03-20 18:39:10 UTC
From:
To:
As an insecure temporary work around until a fix comes downstream, you can
set 'seccomp_sandbox = 0' in qemu.conf


On Thu, 20 Dec 2018 18:12:10 +0100 Guido =?iso-8859-1?Q?G=FCnther?= < agx@sigxcpu.org> wrote:
that
running a

#916441#34
Date:
2020-12-28 15:51:22 UTC
From:
To:
Hi.

Bug still occurs on Debian Buster with libvirt-daemon 5.0.0-4+deb10u1 when setting virgl on amdgpu.
Not reproducible on i965.


Erreur lors du démarrage du domaine: internal error: qemu unexpectedly closed the monitor: /usr/share/libdrm/amdgpu.ids: Permission denied
Failed to create /var/lib/libvirt/.cache for shader cache (Permission denied)---disabling.

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 1400, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1080, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: /usr/share/libdrm/amdgpu.ids: Permission denied
Failed to create /var/lib/libvirt/.cache for shader cache (Permission denied)---disabling.

("permission denied", but virt-manager runs under sudo)

But, setting the workarround mentionned before in qemu.conf works.

Thanks.
Maxime.