On Fri, Oct 23, 2009 at 01:01:32PM +0200, Chris Lalancette wrote:
When working with the TLS transport, I noticed that every single
time
a remote stream was closed, I would get a message like:
09:09:40.793: error : remoteIOReadBuffer:7328 : failed to read from TLS socket A TLS
packet with unexpected length was received.
libvir: QEMU error : failed to read from TLS socket A TLS packet with unexpected length
was received.
in the logs. This happens because of a race in libvirtd; one thread
handles the doRemoteClose(), which calls gnutls_bye() followed by close()
while another thread is poll()'ing on the same fd. Once the close()
happens, the poll returns with revents set to POLLIN, and we would poll
one more time for data from the now-closed fd. Fix this situation by
setting poll->session to NULL when we clean up, and check for that in
remoteIOHandleInput().
ACK, thanks for following though !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/