Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 11:59:48 +0100
From:      Stephan Mantler <step@acm.org>
To:        freebsd-hackers@freebsd.org
Subject:   meteor driver problems
Message-ID:  <20011122115948.A25406@step.cg.tuwien.ac.at>

next in thread | raw e-mail | index | archive | help

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
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=3Dtsleep((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

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

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7/NqjiPnfTBLLyEgRAvkAAJ4iA9s+eM3U2lQP3XwVlL2wRXT4dQCgw4t+
ygemnYyjoOtLWIvxEVrus2Q=
=tcz5
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011122115948.A25406>