From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Knorr Subject: Re: "xm save" trouble -- deadlock? Date: Wed, 02 Nov 2005 12:34:37 +0100 Message-ID: <4368A44D.9080105@suse.de> References: <43679B4C.3030804@suse.de> <4367A2AF.2090707@suse.de> <20051101185800.GB21507@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20051101185800.GB21507@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >> master-xen root /vm/ttylinux# strace -p6568 >> Process 6568 attached - interrupt to quit >> select(4, [3], [], [], {0, 960000}) = 0 (Timeout) >> futex(0x80e53b8, FUTEX_WAKE, 1) = 0 >> accept(3, 0x408193f8, [110]) = -1 EAGAIN (Resource >> temporarily unavailable) >> >> There is no point in calling accept(3) unless select() flags file handle >> #3 as readable. > > This mindboggling piece of loveliness is in xen/web/connection.py. If you can > unpick it, a patch would be more than welcome! Can someone explain the comment on the start of the file? """We make sockets non-blocking so that operations like accept() don't block. We also select on a timeout. Otherwise we have no way of getting the threads to shutdown. """ What exactly is the thread shutdown problem here? Why the timeout is needed in the first place? cheers, Gerd