From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1942 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runsv spinning 100% CPU (was Re: runsv and EAGAIN) Date: Tue, 10 Feb 2009 12:41:06 +0000 (UTC) Message-ID: References: <20080712160716.GA30532@fly.srk.fer.hr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1234269692 18424 80.91.229.12 (10 Feb 2009 12:41:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 12:41:32 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2177-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Feb 10 13:42:46 2009 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1LWrwj-0005GU-Nf for gcsg-supervision@gmane.org; Tue, 10 Feb 2009 13:42:37 +0100 Original-Received: (qmail 31817 invoked by uid 76); 10 Feb 2009 12:41:46 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 31797 invoked from network); 10 Feb 2009 12:41:46 -0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 77.245.32.76 (Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008122010 Iceweasel/3.0.5 (Debian-3.0.5-1)) Original-Sender: news Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1942 Archived-At: Charlie Brady budge.apana.org.au> writes: > I've finally found time to look at this issue again, and have found a way > to replicate the issue at will. > > To replicate, create a service directory containing an empty file > supervise/control in place of the fifo. Create a symlink so that runsvdir > spawns a new runsv process. runsv will then behave as shown in the strace > plus commentary shown below. > > The unexpected behaviour comes from a combination of two factors - > supervise/control is a file and not a fifo, and linux poll() sets POLLIN > for a regular file at EOF: > > http://www.greenend.org.uk/rjk/2001/06/poll.html Yes, I see. > IMO this is an error condition which runsv should handle more gracefully. > The question is - how should the error be handled or corrected? One way > would be for runsv to replace any existing supervise/control at startup > unless it is a fifo. Another option would be to have runsv print out an error message like 'supervise/control exists but is not a fifo.' and exit with 111. This may be better than forcefully removing a file. Regards, Gerrit.