
On Fri, Oct 30, 2009 at 03:36:33PM +0100, Daniel Veillard wrote:
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 !
I'd like to NACK this unless we understand more about why the conenction is being closed while it is still in use. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|