From owner-freebsd-hardware@FreeBSD.ORG Fri Jul 21 15:15:44 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 1DE7016A4DA for ; Fri, 21 Jul 2006 15:15:44 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 7C81643D49 for ; Fri, 21 Jul 2006 15:15:41 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 70119 invoked by uid 2001); 21 Jul 2006 15:15:39 -0000 Date: Fri, 21 Jul 2006 10:15:39 -0500 From: "Rick C. Petty" To: Jo Rhett Message-ID: <20060721151539.GA69956@megan.kiwi-computer.com> References: <20060721000018.GA99237@svcolo.com> <20060721001607.GA64376@megan.kiwi-computer.com> <20060721004731.GC8868@svcolo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060721004731.GC8868@svcolo.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hardware@freebsd.org Subject: Re: device busy -- no locks? X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jul 2006 15:15:44 -0000 On Thu, Jul 20, 2006 at 05:47:31PM -0700, Jo Rhett wrote: > > Sorry, yes. Same results. And if lsof shows things that fstat doesn't, > then this is a bug in FreeBSD. Not necessarily a bug, if you consider the ports tree as "enhancements". I know they show different stuff, e.g. lsof lists shared libraries which are open and IPC stuff. I'm not sure what other differences they have. The biggest troubles I've had with fstat in the past is when I was trying to find someone who held something like /dev/dsp0.2 open and I did a search for just /dev/dsp. I wish fstat was a bit more knowledgable about related devices. > Also note that this system is pretty bone stock. Standard install, plus > mysql and apache. Nothing else would be using the port. It's something > that left it locked, and really only "login" could be the culprit. By locked do you mean someone performed flock(2) or lockf(3) on the device or that someone held the device open? I was under the impression that all open file descriptors and file locks were cleaned up when a process terminates. So I'm not sure what you mean by "left it locked" if there's no current process using that device. > > How did you disable the getty? Was this prior to or after a restart? It > > sounds like /etc/ttys is maybe running a process on it. You need to > > "killall -HUP init" after changing /etc/ttys. But you probably already > > know that. > > Yes, I change "on" to "off" in /etc/ttys and "kill -1 1" :-) I was also asking if you tried rebooting after you disabled getty. There could be a bug in the sio driver or some hardware-related glitch which doesn't fully close the device even though the process is terminated. If the problem goes away after a reboot, this is likely the problem. If not, it still sounds like a device-related problem.. Although I can't find the use of EBUSY (errno 16) in the sio source code... -- Rick C. Petty