From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2025 Path: news.gmane.org!not-for-mail From: Charlie Brady Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runsv failing when starting up logger - missing pipe - failure of logpipe init? Date: Mon, 16 Aug 2010 19:30:02 -0400 (EDT) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: dough.gmane.org 1282001407 13895 80.91.229.12 (16 Aug 2010 23:30:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2010 23:30:07 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2260-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Aug 17 01:30:04 2010 Return-path: Envelope-to: gcsg-supervision@lo.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ol97z-00008Q-AN for gcsg-supervision@lo.gmane.org; Tue, 17 Aug 2010 01:30:03 +0200 Original-Received: (qmail 10777 invoked by uid 76); 16 Aug 2010 23:32:07 -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 10768 invoked from network); 16 Aug 2010 23:32:07 -0000 X-X-Sender: charlieb@e-smith.charlieb.ott.istop.com In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2025 Archived-At: On Mon, 16 Aug 2010, Charlie Brady wrote: > Here's the code in runsv where the child is dying: > > ... > if (p == 0) { > /* child */ > if (haslog) { > if (s->islog) { > if (fd_copy(0, logpipe[0]) == -1) > fatal("unable to setup filedescriptor for ./log/run"); > ... > > and here is where logpipe[0] should have been initialised: > > ... > if (pipe(logpipe) == -1) > fatal("unable to create log pipe"); > ... > > Has anyone else seen this error condition or can posit a situation where > it might be seen? The next question to ponder is where the bug lies. The runsv process here has no fd 5 and fd 6 - IOW, logpipe[0] is 5, but isn't a valid fd. Are there circumstances where a pipe can just cease to be? Should runsv have detected this issue (where pipe() did not return -1, but the fds returned were not valid)? Is this a linux kernel bug?