Date: Thu, 20 Jul 2006 17:47:31 -0700 From: Jo Rhett <jrhett@svcolo.com> To: "Rick C. Petty" <rick-freebsd@kiwi-computer.com> Cc: freebsd-hardware@freebsd.org Subject: Re: device busy -- no locks? Message-ID: <20060721004731.GC8868@svcolo.com> In-Reply-To: <20060721001607.GA64376@megan.kiwi-computer.com> References: <20060721000018.GA99237@svcolo.com> <20060721001607.GA64376@megan.kiwi-computer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the super-quick reply! Responses are inline... On Thu, Jul 20, 2006 at 07:16:07PM -0500, Rick C. Petty wrote: > > root@scapa 47# fstat /dev/ttyd0 > > USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME > > What about "fstat /dev/cuad0" ? Anyway, I've found that fstat is useless, > try using sysutils/lsof instead. Sorry, yes. Same results. And if lsof shows things that fstat doesn't, then this is a bug in FreeBSD. But anyway, root@scapa 63# lsof /dev/cuad0 root@scapa 64# lsof /dev/ttyd0 Nada. 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. > > root@scapa 48# ps -ajwx |grep d0 > > root 12 0 0 0 0 WL ?? 0:00.05 [irq1: atkbd0] > > root 372 0 0 0 0 DL ?? 0:00.24 [md0] > > try "-axww" instead.. I've noticed that processes with long command lines > don't match a regular grep. Same result. > > No locks? No processes using it. Okay, this is uncool. > > And yet "ktrace tip com1" and "kdump -f ktrace.out" clearly show: > > > > 50461 tip CALL open(0x8059030,0x6,0) > > 50461 tip NAMI "/dev/cuad0" > > 50461 tip RET open -1 errno 16 Device busy > > This isn't very useful. A ktrace on the process that's locking the file > would be. :-P See above. I can't find it. :-( > > NOTE: at this time I am suspecting that CD is being misread (it's not > > present - I have a break out box on the line) and that this problem is > > somehow tied to that. This problem appears at random after login has > > exerted itself on the system. I've disabled the getty on ttyd0 and login > > has timed out, but it continues to show "device busy". > > 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" :-) -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060721004731.GC8868>