libvirt/src/rpc
Michal Privoznik 833b901cb7 stream: Check for stream EOF
If client stream does not have any data to sink and neither received
EOF, a dummy packet is sent to the daemon signalising client is ready to
sink some data. However, after we added event loop to client a race may
occur:

Thread 1 calls virNetClientStreamRecvPacket and since no data are cached
nor stream has EOF, it decides to send dummy packet to server which will
sent some data in turn. However, during this decision and actual message
exchange with server -

Thread 2 receives last stream data from server. Therefore an EOF is set
on stream and if there is a call waiting (which is not yet) it is woken
up. However, Thread 1 haven't sent anything so far, so there is no call
to be woken up. So this thread sent dummy packet to daemon, which
ignores that as no stream is associated with such packet and therefore
no reply will ever come.

This race causes client to hang indefinitely.
2012-01-12 12:02:40 +01:00
..
gendispatch.pl API: remote support for VIR_TYPED_PARAM_STRING 2011-11-11 17:25:21 -07:00
genprotocol.pl rpc: handle param_int, plug memory leaks 2011-12-20 08:41:10 -07:00
gensystemtap.pl Rewrite all the DTrace/SystemTAP probing 2011-10-11 11:26:13 +01:00
virkeepalive.c Implement common keepalive handling 2011-11-24 11:44:08 +01:00
virkeepalive.h Implement common keepalive handling 2011-11-24 11:44:08 +01:00
virkeepaliveprotocol.x Define keepalive protocol 2011-11-24 11:44:08 +01:00
virnetclient.c stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetclient.h stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetclientprogram.c Split virNetClientSend into 2 methods 2011-11-16 10:48:46 +00:00
virnetclientprogram.h Add client side support for FD passing 2011-10-28 10:42:54 +01:00
virnetclientstream.c stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetclientstream.h stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetmessage.c Extend RPC protocol to allow FD passing 2011-10-28 10:27:15 +01:00
virnetmessage.h Fix sending/receiving of FDs when stream returns EAGAIN 2011-11-07 09:26:59 +00:00
virnetprotocol.x Extend RPC protocol to allow FD passing 2011-10-28 10:27:15 +01:00
virnetsaslcontext.c rpc:fix sasl session relocking intead of unlocking it 2011-08-04 21:27:52 +08:00
virnetsaslcontext.h Generic module for handling SASL authentication & encryption 2011-06-24 11:48:25 +01:00
virnetserver.c Implement keepalive protocol in libvirt daemon 2011-11-24 11:44:08 +01:00
virnetserver.h Implement keepalive protocol in libvirt daemon 2011-11-24 11:44:08 +01:00
virnetserverclient.c Implement keepalive protocol in libvirt daemon 2011-11-24 11:44:08 +01:00
virnetserverclient.h Implement keepalive protocol in libvirt daemon 2011-11-24 11:44:08 +01:00
virnetservermdns.c Fix memory leaks in MDNS code 2011-07-26 08:09:18 +08:00
virnetservermdns.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetserverprogram.c maint: fix improper use of 'an' 2011-12-03 17:11:56 -07:00
virnetserverprogram.h Extend RPC server to allow FD passing 2011-10-28 10:43:00 +01:00
virnetserverservice.c Support changing UNIX socket owner in virNetSocketNewListenUNIX 2011-08-15 15:21:31 +02:00
virnetserverservice.h daemon: Unlink unix socket paths on shutdown 2011-08-04 16:54:58 +08:00
virnetsocket.c Improve error reporting when libvirtd is not installed 2011-12-07 09:58:21 +00:00
virnetsocket.h Allow non-blocking message sending on virNetClient 2011-11-16 10:49:55 +00:00
virnettlscontext.c Rewrite all the DTrace/SystemTAP probing 2011-10-11 11:26:13 +01:00
virnettlscontext.h daemon: Move TLS initialization to virInitialize 2011-08-25 10:22:03 +02:00