From owner-freebsd-bugs Sun Apr 30 19:59:54 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from aristotle.net (aristotle.net [204.233.139.1]) by hub.freebsd.org (Postfix) with ESMTP id F068937B76A for ; Sun, 30 Apr 2000 19:59:46 -0700 (PDT) (envelope-from sch@aristotle.net) Received: from tiger.home.net (IDENT:sharris@pm12ppp131.aristotle.net [207.150.22.131]) by aristotle.net (8.9.0/8.9.0) with SMTP id VAA05042 for ; Sun, 30 Apr 2000 21:59:43 -0500 (CDT) From: Stephen Harris To: freebsd-bugs@FreeBSD.ORG Subject: contiguous bt848/878 captures to file causes system hang Date: Sun, 30 Apr 2000 21:02:36 -0500 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00043021033101.03347@tiger.home.net> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Submitter-Id: current-users >Originator: Stephen Harris >Organization: None >Confidential: no >Synopsis: close-together bt848/878 captures to file causes system hang >Severity: serious >Priority: medium >Category: kern >Release: FreeBSD 4.0-RELEASE i386 >Class: sw-bug >Environment: System is a 166Mhz dell, here's the part of the kernel config file relating to the capture boards: ############################################################# options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC options BKTR_SIS_VIA_MODE device smbus device iicbus device iicbb device bktr device ic device iic device iicsmb # smb over i2c bridge ############################################################ The driver version is the current one (as of April 30, 2000) available from: ftp://telepresence.dmem.strath.ac.uk/pub/bt848/driver/2.12 >Description: Short program causes system to lock-up completely ( no response to any keys, can't telnet to it, harddrive light doesn't go off even though there's no audible activity, num-lock key doesn't toggle its light). The program just repeatedly captures an image and writes it to disk, all in a SIGALRM handler. If the spacing between the SIGALARM's is made to be such that the disk writes run together (hard drive light on continuously), the system locks solid after a few seconds. This happened with RELEASE-3.3 also, I've never tried 3.4. I have tried it on both a bt848 and a bt878 and have gotten lockups on both (release 3.3 with bt848 and release 4.0 with bt878). I've tried with and without BKTR_SIS_VIA_MODE (on 4.0), locks up either way. Note that just repeatedly capturing and reading the buffer (and not writing to file) does not cause a lockup, nor just repeatedly writing the capture buffer to file (after only capturing once, initially). You have to capture and write repeatedly (close together) to get the hang. >How-To-Repeat: Just compile and run this program: /* --------------------------------------- */ /* lockup.c */ #include #include #include #include #include #include #include #include "/sys/i386/include/ioctl_meteor.h" /* -------------------------------------------------- */ /* Stuff to ajust ----------------------------------- */ /* It seems to be only when both of these are off that a lockup happens, ie. only when capturing and writing to a file during every tick */ #define JUST_READ_DONT_WRITE_FILE 0 #define ONLY_CAPTURE_ONCE 0 /* This timer interval needs to be set low enough for your machine that the writes are continuous; my machine is 166Mhz, and 20 causes a lockup in just a few seconds, while 50 doesn't. */ int interval_100ths = 10; /* 100ths of sec between captures */ /* Stuff to ajust ----------------------------------- */ /* -------------------------------------------------- */ #define BYTES_PER_PIXEL 4 #define WIDTH 640 #define HEIGHT 480 static const int BUF_LEN = WIDTH * HEIGHT * BYTES_PER_PIXEL; static const int BOARD_COLOR_FORMAT = METEOR_GEO_RGB24; static const int BOARD_INPUT_SOURCE = METEOR_INPUT_DEV0; static const int BOARD_SOURCE_TYPE = METEOR_FMT_NTSC; int vdev_fd; void* grab_buf; static void start_timer(int hundredths); /*-----------------------------------------------------------------------*/ /* SIGALRM handler, time to do a capture */ void next_capture(int unused) { static int first_time = 1; if ( ! ONLY_CAPTURE_ONCE || first_time ) { int cap_single = METEOR_CAP_SINGLE; ioctl(vdev_fd, METEORCAPTUR, &cap_single); first_time = 0; } if ( JUST_READ_DONT_WRITE_FILE ) { int ix; for (ix=0; ixFix: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message