qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()
@ 2013-01-14  8:16 Liu Yuan
  2013-01-14  9:09 ` Paolo Bonzini
  2013-01-14 10:23 ` Stefan Hajnoczi
  0 siblings, 2 replies; 7+ messages in thread
From: Liu Yuan @ 2013-01-14  8:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi

Hi List,
  This problem can be reproduced by:
  1. start a sheepdog cluster and create a volume 'test'*
  2. attach 'test' to a bootable image like
     $ qemu -hda image -drive if=virtio,file=sheepdog:test
  3. pkill sheep # create a half-closed situation

I have straced it that QEMU is busy doing nonsense read/write() after
select() in os_host_main_loop_wait(). I have no knowledge of
glib_select_xxx, so someone please help fix it.

Another unexpected behavior is that qemu_co_send() will send data
successfully for the half-closed situation, even the other end is
completely down. I think the *expected* behavior is that we get notified
by a HUP and close the affected sockfd, then qemu_co_send() will not
send any data, then the caller of qemu_co_send() can handle error case.

I don't know which one I should Cc, so I only include Stefan in.

* You can easily start up a one node sheepdog cluster as following:
 $ git clone https://github.com/collie/sheepdog.git
 $ cd sheepdog
 $ apt-get install liburcu-dev
 $ ./autogen.sh; ./configure --disable-corosync;make
 #start up a one node sheep cluster
 $ mkdir store;./sheep/sheep store -c local
 $ collie/collie cluster format -c 1
 #create a volume named test
 $ collie/collie vdi create test 1G

Thanks,
Yuan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-16  6:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14  8:16 [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send() Liu Yuan
2013-01-14  9:09 ` Paolo Bonzini
2013-01-14  9:29   ` Liu Yuan
2013-01-14 10:07     ` Paolo Bonzini
2013-01-16  6:39       ` Liu Yuan
2013-01-14 10:23 ` Stefan Hajnoczi
2013-01-14 10:26   ` Liu Yuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).