device busy -- no locks?

Jo Rhett jrhett at svcolo.com
Fri Jul 21 00:00:20 UTC 2006


root at scapa 45# tip com1
/dev/cuad0: Device busy
link down

Hm.  Really?

root at scapa 46# ls /var/spool/lock
root at scapa 47# fstat /dev/ttyd0
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME

root at 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]

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

Where is this lock hiding?  What process has this device locked?

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".

root at scapa 51# uname -a
FreeBSD scapa.sv 6.0-RELEASE FreeBSD 6.0-RELEASE #4: Fri Nov 11 13:29:33
PST 2005     root at barrel.svcolo.com:/usr/obj/usr/src/sys/GENERIC  i386

-- 
Jo Rhett
senior geek
SVcolo : Silicon Valley Colocation


More information about the freebsd-hardware mailing list