From owner-freebsd-current@FreeBSD.ORG Wed Apr 11 11:24:44 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 EAE8616A402 for ; Wed, 11 Apr 2007 11:24:44 +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 68B9313C45A for ; Wed, 11 Apr 2007 11:24:44 +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 l3BBODAR006957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 11 Apr 2007 14:24:19 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l3BBNstI005093; Wed, 11 Apr 2007 14:24:06 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l3BBNr0d005092; Wed, 11 Apr 2007 14:23:53 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 11 Apr 2007 14:23:53 +0300 From: Giorgos Keramidas To: Dag-Erling Sm?rgrav Message-ID: <20070411112353.GA5003@kobe.laptop> References: <86lkgzz6ay.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86lkgzz6ay.fsf@dwp.des.no> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.518, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.68, 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: script 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: Wed, 11 Apr 2007 11:24:45 -0000 On 2007-04-11 10:03, Dag-Erling Sm?rgrav wrote: > When I try to use script(1) on recent -CURRENT, it invariably gets > stuck in devdrn upon exit, and not even SIGKILL will kill it. I don't > use it much, so I have no idea how long ago it broke. Is anyone else > seeing this? Try turning off kern.pts.enable, or use the following patch to revert one of the commits by tegge to `kern_conf.c': %%% # HG changeset patch # User Giorgos Keramidas # Date 1164424009 -7200 # Node ID 4d6784b6bd2b63fd7a8e235402c37f0edea6369f # Parent e4ce0f3f5ec51813ab4a590127484923437351e9 Locally revert cvs change 1.199 to src/sys/kern/kern_conf.c This causes pty deallocation to hang forever with kern.pts.enable=1 which makes it pretty hard to work with anything that uses ptys, like xterm, screen, script, etc. diff -r e4ce0f3f5ec5 -r 4d6784b6bd2b sys/kern/kern_conf.c --- a/sys/kern/kern_conf.c Sat Nov 25 05:05:49 2006 +0200 +++ b/sys/kern/kern_conf.c Sat Nov 25 05:06:49 2006 +0200 @@ -676,7 +676,6 @@ destroy_devl(struct cdev *dev) dev->si_flags &= ~SI_CLONELIST; } - dev->si_refcount++; /* Avoid race with dev_rel() */ csw = dev->si_devsw; dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { @@ -686,10 +685,6 @@ destroy_devl(struct cdev *dev) printf("Still %lu threads in %s\n", dev->si_threadcount, devtoname(dev)); } - while (dev->si_threadcount != 0) { - /* Use unique dummy wait ident */ - msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); - } dev->si_drv1 = 0; dev->si_drv2 = 0; @@ -704,7 +699,6 @@ destroy_devl(struct cdev *dev) fini_cdevsw(csw); } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ if (dev->si_refcount > 0) { LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); %%% I know that Tor is working on a real fix for this, but reverting 1.199 stops pty-using processes from getting stuck forever in devdrn for me, so I use it locally as a workaround until the real bug is fixed. - Giorgos