From owner-freebsd-bugs Sun Apr 30 20: 0:12 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5C63437C1E8 for ; Sun, 30 Apr 2000 20:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA85529; Sun, 30 Apr 2000 20:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from aristotle.net (aristotle.net [204.233.139.1]) by hub.freebsd.org (Postfix) with ESMTP id C48F537B6AD for ; Sun, 30 Apr 2000 19:58:31 -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 VAA04267 for ; Sun, 30 Apr 2000 21:58:28 -0500 (CDT) Message-Id: <00043021021500.03347@tiger.home.net> Date: Sun, 30 Apr 2000 21:01:01 -0500 From: Stephen Harris To: FreeBSD-gnats-submit@freebsd.org Subject: kern/18316: contiguous bt848/878 captures to file causes system hang Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18316 >Category: kern >Synopsis: close-together bt848/878 captures to file causes system hang >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 30 20:00:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Stephen Harris >Release: FreeBSD 4.0-RELEASE i386 >Organization: None >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: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message