hi,

i've been experiencing weird problems with the Meteor device driver..
on two machines of the seven we've installed, the METEOR_CAP_SINGLE
ioctl locks up the process once in a while (every few hours). after
attaching gdb (or breaking into it if the process has been started 
from gdb), a simple 'cont' is all it takes.
the lockup apparently occurs in _thread_sys_ioctl (this is a multi-
threaded application); further research lead me to the following
snippet in meteor_ioctl() (from pci/meteor.c). the exact line numbers
seem to change between FreeBSD-3.0, -3.4 and -4.3, but the tsleep()
call is the same.

( approximately line 1610 )
   case METEOR_CAP_SINGLE:
( ... sanity checks ...)
     start_capture(mtr, METEOR_SINGLE);
     /* wait for capture to complete */
     error=tsleep((caddr_t)mtr, METPRI, "capturing", 0);
     if(error)
( ... )

this doesn't look too suspicious unless the capture doesn't really
happen for some reason (as seems to be the case on those machines).
tsleep() will just sit there and block the process indefinitely.
IMHO a better approach would be to set the timeout to, say, ten
frames (ample time even if the frame grabber has just lost sync)
and return an error if the capture was unsuccessful.

i'll try this on one of the machines i've been having trouble with...
comments are of course welcome.

best regards,
-step

-- 
stephan mantler: endurance sports maniac    reality is in fact virtual.
http://step.wastelander.org/                              [EMAIL PROTECTED]
gnu pgp fingerprint: 0A25 EBE7 8AD3 A65D FEB5 C40E 88F9 DF4C 12CB C848

Attachment: msg28679/pgp00000.pgp
Description: PGP signature

Reply via email to