From owner-freebsd-hackers@freebsd.org Sun Dec 11 12:46:41 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9619C705D9 for ; Sun, 11 Dec 2016 12:46:41 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 849F71933 for ; Sun, 11 Dec 2016 12:46:41 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id 2DDBC41F5; Sun, 11 Dec 2016 13:46:38 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 1AA1028494; Sun, 11 Dec 2016 13:46:38 +0100 (CET) Date: Sun, 11 Dec 2016 13:46:38 +0100 From: Jilles Tjoelker To: Jonathan de Boyne Pollard Cc: FreeBSD Hackers , supervision@list.skarnet.org Subject: Re: NOTE_TRACK, EVFILT_PROC, kqueue, and subreapers Message-ID: <20161211124637.GA17315@stack.nl> References: <20161201172846.GP3428@protected.rcdrun.com> <20161201124118.46778e2b@mydesk.domain.cxm> <20161201174837.GR3428@protected.rcdrun.com> <20161201125438.15230317@mydesk.domain.cxm> <20161206104020.6b2ebb30@eto-mona.office.smartweb.sk> <20161206102637.1ddd152a@mydesk.domain.cxm> <20161207155638.4b2dd629@eto-mona.office.smartweb.sk> <630ace89-e29b-d0d3-9f15-110d8dc3de08@NTLWorld.com> <20161208132842.5d7940bd@eto-mona.office.smartweb.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 12:46:41 -0000 On Thu, Dec 08, 2016 at 08:23:29PM +0000, Jonathan de Boyne Pollard wrote: > Martin "eto" Misuth: > > I think that might be the reason why my PID1 s6-svscan on FreeBSD is > > accumulating zombies sometimes (seems like it is affected by dead > > descendants of ssh and my experiments). [...] > > Anyway as you are probably much closer to FreeBSD team than I am, [...] > I'm not. You have the same access as I and the rest of the world have. > For what it's worth, I've seen similar behaviour with zombies lying > around. If we can nail it down you can file a kernel bug report. > Have you checked that you aren't getting a NOTE_EXIT? As reported in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213928 reapers do not receive SIGCHLD when inheriting zombies, although they do receive SIGCHLD when an inherited descendant process later terminates and are awakened when in a wait call for a matching process. This should probably be fixed. NOTE_TRACK has the inherent problem of what to do when NOTE_TRACKERR happens and has problems with process ID reuse, so it seems better to use reaper instead of it. -- Jilles Tjoelker