From owner-freebsd-current@FreeBSD.ORG Thu May 31 18:08:01 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A88216A400 for ; Thu, 31 May 2007 18:08:01 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5E413C43E for ; Thu, 31 May 2007 18:08:00 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l4VI6EVb021958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 31 May 2007 21:06:22 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l4VI5uEZ010971; Thu, 31 May 2007 21:06:09 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l4VI5tbZ010970; Thu, 31 May 2007 21:05:55 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 31 May 2007 21:05:55 +0300 From: Giorgos Keramidas To: Robert Watson Message-ID: <20070531180555.GA10910@kobe.laptop> References: <20070531183719.B77697@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070531183719.B77697@fledge.watson.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.528, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.67, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: current@freebsd.org Subject: Re: watch(8) stuck in devdrn X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2007 18:08:01 -0000 On 2007-05-31 18:38, Robert Watson wrote: > I was using watch(8) this afternoon, and on trying to quit, ran into this: > > peppercorn:~> ps axl | grep watch > 0 14200 14194 0 -8 0 3416 1056 devdrn D p2- 0:00.01 watch -W tt > > It was running on a pty, but the target tty was ttyv1. If you have kern.pts.enable=1 you may have to use: http://hg.hellug.gr/freebsd/src-keramida/file/944ac3982de1/pty-devdrn Without this patch and kern.pts.enable=1 all ptys seem to get stuck in devdrn on process exit. AFAIK, Kostik Belousov and Tor Egge know this and are already working on a fix: % Date: Fri, 6 Apr 2007 13:10:48 +0300 % Message-ID: <20070406101048.GK308@deviant.kiev.zoral.com.ua> % From: Kostik Belousov % Subject: Re: pty releasing but with kern.pts.enable=1? % To: Giorgos Keramidas % % [-- The following data is signed --] % % On Fri, Apr 06, 2007 at 03:45:29AM +0300, Giorgos Keramidas wrote: % > Hi Konstantin, % > % > Kris Kennaway suggested I contact you, to ask about a possible pty bug % > in FreeBSD CVS HEAD. Without the patch below, every time I exit from a % > process using pty's the process blocks forever. % > % > http://people.freebsd.org/~keramida/ptsbug.diff % > % > Do you have any idea why dev->si_threadcount never reaches zero for pty % > devices, or how I can statr troubleshooting this further? % % Yes, the issue is known (drivers must not call destroy_dev() from d_close % method). The patch is being worked on with the help of Tor Egge. % % [-- End of signed data --]