Date: Wed, 11 Apr 2007 14:23:53 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Dag-Erling Sm?rgrav <des@des.no> Cc: current@freebsd.org Subject: Re: script stuck in devdrn Message-ID: <20070411112353.GA5003@kobe.laptop> In-Reply-To: <86lkgzz6ay.fsf@dwp.des.no> References: <86lkgzz6ay.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-04-11 10:03, Dag-Erling Sm?rgrav <des@des.no> 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 <keramida@ceid.upatras.gr> # 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070411112353.GA5003>