[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler |
Date: |
Tue, 16 Jan 2018 18:01:19 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Tue, Jan 16, 2018 at 06:56:20PM +0100, Marc-André Lureau wrote:
> Hi
>
> On Wed, Jan 10, 2018 at 2:18 PM, Klim Kireev <address@hidden> wrote:
> > The following behavior was observed for QEMU configured by libvirt
> > to use guest agent as usual for the guests without virtio-serial
> > driver (Windows or the guest remaining in BIOS stage).
> >
> > In QEMU on first connect to listen character device socket
> > the listen socket is removed from poll just after the accept().
> > virtio_serial_guest_ready() returns 0 and the descriptor
> > of the connected Unix socket is removed from poll and it will
> > not be present in poll() until the guest will initialize the driver
> > and change the state of the serial to "guest connected".
> >
> > In libvirt connect() to guest agent is performed on restart and
> > is run under VM state lock. Connect() is blocking and can
> > wait forever.
> > In this case libvirt can not perform ANY operation on that VM.
>
> Adding Daniel in CC for comments about libvirt behaviour.
This is a libvirt bug - libvirt should put a finite timeout on connecting
to the guest agent socket to avoid this.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|