From owner-freebsd-hardware@FreeBSD.ORG Fri Oct 13 06:31:55 2006 Return-Path: X-Original-To: freebsd-hardware@freebsd.org Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D09D416A407 for ; Fri, 13 Oct 2006 06:31:55 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50F9343D45 for ; Fri, 13 Oct 2006 06:31:54 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id B94C41111D7; Fri, 13 Oct 2006 16:31:52 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id BAD368C37; Fri, 13 Oct 2006 16:31:51 +1000 (EST) Date: Fri, 13 Oct 2006 16:31:45 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jo Rhett In-Reply-To: <452EB286.8000503@svcolo.com> Message-ID: <20061013152714.Y49451@delplex.bde.org> References: <20060721000018.GA99237@svcolo.com> <20060721001607.GA64376@megan.kiwi-computer.com> <20060721004731.GC8868@svcolo.com> <20060724154856.I58894@delplex.bde.org> <452EB286.8000503@svcolo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Rick C. Petty" , freebsd-hardware@freebsd.org Subject: Re: Bounty offered to fix sio device lock problem X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2006 06:31:55 -0000 On Thu, 12 Oct 2006, Jo Rhett wrote: > Bruce -- who owns getting this fixed? Or who should own it? Or who will > take on getting it fixed if we offer a bounty on it? > > Replication scenario: > Modem on sio0 (or sio1 or any normal i386 serial port) > /etc/ttys has port enabled with "dialup" > qpage (from ports, unchanged) uses modem for dialout > ** or just write a script that periodically dials out using tip > > Within a day and often within a few hours, the serial port will go awol. You > can't talk to the modem any more. Modem is just fine. > Rebooting the system solves the problem. Rebooting the modem does not solve > it. > > 100% replicable, and sooner versus later if you call out more often. [context lost to top posting] I mentioned an old vfs refcounting bug. New ones turned up a week or two ago. They cause leaked pty masters and worse. The pty leak is caused by last-close sometimes not being called. For pty masters, the leak is permanent since reopening of the master is not permitted for security reasons so there is no way to reach the device close, but for sio devices it should be possible to fix up the problem by reopening and closing the device relevant device after ensuring that it is not already open: - for cua*, simply stty -f'ing it or just using it should be enough. I guess this is not your problem, since the fix is almost automatic. - for tty*, it may be necessary to disable getty on the port and kill the current getty, since the old vfs refcounting bug normally prevents reaching last-close if any process is sleeping in open, so if you don't disable getty on the port then you have to race with the new getty to complete the open/last-close before the new getty sleeps in open. Many nearby vfs bugs will be fixed in 6.2-RELEASE, but no fix is in sight for the main refcounting ones. Bruce