Re: [libvirt PATCH] util: keep the pidfile locked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25. 3. 2020 0:58, marcandre.lureau@xxxxxxxxxx wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> Unfortunately, advisory record locking lose the lock if any fd refering
> to the file is closed. There doesn't seem to be a way to preserve the
> lock atomically. We could eventually retake the lock if low pidfilefd
> is required.
> 
> This fixes processes being leaked, as they are not killed in
> virPidFileForceCleanupPath() if the lock can be taken. Here also, we may
> consider this is not good enough, as a process may leak by simply
> closing the pidfilefd.
> 
> Fixes commit d146105f1e4a9e0ab179f0b78c070ea38b9d5334 ("virCommand:
> Actually acquire pidfile instead of just writing it")
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> ---
>  src/util/vircommand.c       | 12 ++----------
>  tests/commanddata/test4.log |  2 +-
>  2 files changed, 3 insertions(+), 11 deletions(-)

Ooops.

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

and pushed. Thanks, for fixing this.

Michal





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux