From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 17:58:37 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B542116A4E5; Fri, 4 Jan 2008 17:58:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 363EC13C465; Fri, 4 Jan 2008 17:58:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227293551-1834499 for multiple; Fri, 04 Jan 2008 12:54:50 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m04HuaQV040837; Fri, 4 Jan 2008 12:56:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Tai-hwa Liang Date: Fri, 4 Jan 2008 12:56:42 -0500 User-Agent: KMail/1.9.6 References: <474D81DB.7020004@FreeBSD.org> <200801031652.20807.jhb@freebsd.org> <0801041816427.55589@www.mmlab.cse.yzu.edu.tw> In-Reply-To: <0801041816427.55589@www.mmlab.cse.yzu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801041256.43153.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 04 Jan 2008 12:56:38 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5363/Fri Jan 4 08:37:27 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Remko Lodder , freebsd-current@freebsd.org, kib@freebsd.org Subject: Re: [Fwd: Re: kern/118258 sysctl causing panics on 7.0-xxx] 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: Fri, 04 Jan 2008 17:58:37 -0000 On Friday 04 January 2008 05:19:28 am Tai-hwa Liang wrote: > On Thu, 3 Jan 2008, John Baldwin wrote: > > On Thursday 29 November 2007 10:53:32 pm Tai-hwa Liang wrote: > >> On Wed, 28 Nov 2007, Remko Lodder wrote: > >>> Hello, > >>> > >>> So as per Jeff's information, can someone from the -current > >>> list either contact jeff or try to resolve the problems > >>> mentioned? :) > >> > >> This is a longstanding bug which also exists in RELENG_6. It turns out > >> that 'sysctl kern.ttys' after a terminal device is removed could trigger > >> this panic reliably. For example, do 'sysctl kern.ttys' multiple times > >> after detaching an USB serial-to-rs232 cable or a PCMCIA modem card. > >> > >> Alternatively, following script would demo the panic if you don't have > >> a physically removable terminal device: > >> > >> #!/bin/sh > >> # > >> # Warning! Running this script as root will panic your CURRENT box... > >> # > >> while true; do > >> kldload dcons > >> kldunload dcons > >> ls /dev > >> sysctl kern.ttys > >> sleep 1 > >> done > >> > >> This seems to be a race between devfs and destroy_dev(), Cc'ing kib@ > >> since he probably has more clues in this area. > > > > Try this patch. Also available at > > http://www.FreeBSD.org/~jhb/patches/ttys_sysctl.patch > > With this patch, -CURRENT no longer boots and panics as follows: Fixed, was missing an unlock at the bottom of the loop. Patch is updated at the same URL. -- John Baldwin