[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/xenstore: don't close connection in xs_talkv()
Sorry to come into this late. Andrew Cooper writes ("Re: [Xen-devel] [PATCH] tools/xenstore: don't close connection in xs_talkv()"): > On 23/03/2020 15:44, Andrew Cooper wrote: > > On 23/03/2020 14:29, Juergen Gross wrote: > >> In case of some errors xs_talkv() will close the connection to > >> Xenstore. This is annoying as it is not clear to the caller in which > >> error case the connection is still available. > >> > >> Drop that implicit closing to make the interface behave in a sane and > >> predictable way. > >> > >> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > > Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > > > This definitely does improve the cascade failure cases. > > Actually, I spoke too soon. The EBADF goes, but the next read_message() > ends up pulling junk out of the ring. I'm afraid this is predictable. For most of these errors there is nothing else sensible that the client library could do. The connection has been rendered unuseable. In principle I guess it could reconnect to the socket, but this is a "should never happend" event. EBADF is a worrying error because in many cases it means something has messed up the process's fd space, which can easily lead to really bad behaviours. But having read the code in xenstore-ls, I see that as well as closing the fd it sets the variable containing the fd number to -1. So all future calls return EBADF. I think this is correct. Ian.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |