On Fri, Oct 28, 2016 at 12:33:28PM -0700, Prerna Saxena wrote:
An errno=ECONNRESET received on a monitor socket reflects that the guest may have closed the socket.
How would they close it? Does that happen when the process is dying?
Today, we just mark it as a 'hangup' and do not trigger the eof callback.
I'm guessing that's because the process is not quitting and killing the domain would be weird.
I've been looking at a slew of such messages in libvirt logs. If the monitor socket indicated an ECONNRESET, it would possibly make sense to mark the socket closed so that the "eof" callback may then be invoked.
It depends. What are all the ways you can call ECONNRESET on such socket?
Is there a subtle corner case I'm missing here ? Signed-off-by: Prerna Saxena <saxenap.ltc@xxxxxxxxx> --- src/qemu/qemu_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a5e14b2..dcafa5a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -690,10 +690,11 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque) if (events & VIR_EVENT_HANDLE_HANGUP) { hangup = true; + eof = true; if (!error) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("End of file from qemu monitor")); - eof = true; + events &= ~VIR_EVENT_HANDLE_HANGUP; } } -- 1.8.1.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list