Re: [libvirt] [PATCH] phyp: too much timeout when polling socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 11, 2009 at 03:11:31AM -0200, Eduardo Otubo wrote:
> Hello all,
>
> Since I moved to libssh2 I had noticed a weird behaviour, virsh was  
> taking too much time to complete the operations when using phyp driver.  
> Just found the problem, 10 seconds of timeout passed to select().  
> Changed to zero, since I'm just polling the socket.
>
> Actually this patch is more important than it seems, now I can write a  
> script (using virsh) to test all the phyp features.

  The problem is that you end up creating a busy loop by doing this,
and I would be surprized if that patch was actually correct. Somehow
somewhere in one of the loops calling waitsocket() you should not make
that call, this is what is blocking you and using gdb (or another
debugger) during that time out will allow you to find out exactly where
this is hapening. So rather than just dropping the ball and just looping
you should take that opportunity of a reproduceable bug to debug it :-)

  In the meantime moving the timeout from 10s to 1 millisecond by
changing tv_sec to 0 and tv_usec to 1000 is certainly a good
workaround, it will still avoid looping needlessly, and the 1ms extra
timeout should not break your scripts. I will change the code
accordingly, but you should debug your issue with the 10s delay (or even
increase it if it makes things easier to set up).

  So I pushed that modified fix but please debug the issue :-)

Daniel


-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]