On Thu, Mar 11, 2021 at 16:47:54 -0700, Jim Fehlig wrote:
> On 3/10/21 9:37 AM, Peter Krempa wrote:
> > Commit 94e45d1042e broke exec-restart of virtlogd and virtlockd as the
> > code waiting for the daemon shutdown closed the daemons before
> > exec-restarting.
>
> This reminds me of an odd issue we encountered three years ago, fixed by Daniel
>
>
https://listman.redhat.com/archives/libvir-list/2018-March/msg00298.html
>
> I tested your patches but notice locks are still lost on re-exec.
>
> qemu.conf:
> lock_manager = "lockd"
>
> qemu-lockd.conf:
> file_lockspace_dir = "/var/lib/libvirt/lockspace"
>
> /var/lib/libvirt/lockspace is nothing special, xfs on a local disk. After
> starting a VM
>
> # ls /var/lib/libvirt/lockspace/
> a89872e150e6b9e4cbd59ef2bd289bc6cd0a8fa6fbf533c41957f77a90381e9c
> # lslocks | grep lockd
> virtlockd 95009 POSIX WRITE 0 0 0
/var/lib/libvirt/lockspace/a89872e150e6b9e4cbd59ef2bd289bc6cd0a8fa6fbf533c41957f77a90381e9c
> virtlockd 95009 POSIX 5B WRITE 0 0 0 /run/virtlockd.pid
> # systemctl reload virtlockd
Could you make sure that the virtlockd process before and after has the
same pid, so that it wasn't actually restarted by systemct?
I'm asking because in my current test I've encountered another crash
when exec-restarting:
2021-03-12 08:41:31.649+0000: 2765718: error : virJSONValueToBuffer:1946 : internal
error: failed to convert virJSONValue to yajl data
double free or corruption (fasttop)
Looks like a double free. I'll post patches later for this.