From owner-freebsd-hardware Thu Apr 3 09:21:57 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA03755 for hardware-outgoing; Thu, 3 Apr 1997 09:21:57 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA03743 for ; Thu, 3 Apr 1997 09:21:54 -0800 (PST) Received: from egeo.unipg.it (egeo.unipg.it [141.250.1.4]) by who.cdrom.com (8.8.5/8.6.11) with SMTP id JAA18378 for ; Thu, 3 Apr 1997 09:06:56 -0800 (PST) Received: by egeo.unipg.it (AIX 3.2/UCB 5.64/MH-1.09) id AA29921; Thu, 3 Apr 1997 19:06:33 +0200 Date: Thu, 3 Apr 1997 19:06:33 +0200 From: peppe@unipg.it (Giuseppe Vitillaro) Message-Id: <9704031706.AA29921@egeo.unipg.it> To: hardware@freebsd.org Subject: FreeBSD 2.2.1 and 2940 hangs Sender: owner-hardware@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm experiencing problems with this configuration: MotherBoard: Intel TUCSON TC430HX - Intel Pentium 133Mhz SCSI Adpter: Adaptec 2940 (Bios Level 1.23) HD target 0: HP C3725S 5249 (Internal) HD target 1: IBM DORS-32160 WA6A (Internal) CD target 4: PIONEER CD-ROM DR-124X 1.04 (External) Memory : 16Mx4 EDO 60ns I just finished to install FreeBSD 2.2.1-RELEASE and I did some trial on my configuration (for other reasons: I wanted to test my new mother board). If I exercise my hard disks and my cdrom at the same time after a (short: 5 minutes) while the system hangs. Sometime the kernel panic with some obscure (for me) message about SCSI timeouts other times it just sit without a message (but it answer to a ping from another machine). The same "exercise" on the disks alone do not produce the problem. I already tried to change all the SCSI cables (internal and external), terminators, the controller (a 2940U bios 1.21) and even the CD (switching to an HP CD-R 4020i). I always get the same problem. My exercise consist in this commands: dd if=/dev/rcd0a of=/dev/null bs=2k dd if=/dev/rsd0 of=/dev/null bs=64K dd if=/dev/rsd1 of=/dev/null bs=128K and keeping running a little C program I wrote by myself that seek randomly on a big file (about 32Mb) (command line "stdisk filename", the "filename" should already exists and in my case is on a filesystem of the disk /dev/sd1). After 5/10 minutes of this run the system hangs, often without any message. The machine itsel is alive: it answers to a ping and the keybord numlock turn on and off. If I do the same exercise without the CD dd the machine is alive after half an hour. The 2940 is configured rather near the Adaptec defaults (beside for > 1Gb disk support and CD boot). I'll append (sorry for the long mail) the dmesg out of my machine and the source of the "stdisk" exercise program. The question is: what may be the origin of this hang? Thank in advance, Peppe. ===== dmesg output Thank in advance, Peppe. Copyright (c) 1992-1996 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 2.2.1-RELEASE #0: Thu Apr 3 16:48:21 CEST 1997 root@phoenix:/usr/src/sys/compile/PHOENIX CPU: Pentium (132.96-MHz 586-class CPU) Origin = "GenuineIntel" Id = 0x52c Stepping=12 Features=0x1bf real memory = 67108864 (65536K bytes) avail memory = 62676992 (61208K bytes) Probing for devices on PCI bus 0: chip0 rev 3 on pci0:0 chip1 rev 1 on pci0:7:0 chip2 rev 0 on pci0:7:1 ahc0 rev 0 int a irq 11 on pci0:13 ahc0: aic7870 Single Channel, SCSI Id=7, 16 SCBs ahc0 waiting for scsi devices to settle (ahc0:0:0): "HP C3725S 5249" type 0 fixed SCSI 2 sd0(ahc0:0:0): Direct-Access 2047MB (4194058 512 byte sectors) (ahc0:1:0): "IBM DORS-32160 WA6A" type 0 fixed SCSI 2 sd1(ahc0:1:0): Direct-Access 2063MB (4226725 512 byte sectors) (ahc0:4:0): "PIONEER CD-ROM DR-124X 1.04" type 5 removable SCSI 2 cd0(ahc0:4:0): CD-ROM cd present [301866 x 2048 byte records] vga0 rev 0 on pci0:14 Probing for devices on the ISA bus: sc0 at 0x60-0x6f irq 1 on motherboard sc0: VGA color <16 virtual consoles, flags=0x0> ed0 at 0x280-0x29f irq 15 on isa ed0: address 00:40:95:81:2b:79, type NE2000 (16 bit) sio0 at 0x3f8-0x3ff irq 4 on isa sio0: type 16550A sio1 at 0x2f8-0x2ff irq 3 on isa sio1: type 16550A lpt0 at 0x378-0x37f irq 7 on isa lpt0: Interrupt-driven port lp0: TCP/IP capable interface fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: NEC 72065B fd0: 1.44MB 3.5in npx0 on motherboard npx0: INT 16 interface ================= stdisk.c #include #include #include #include #include #include #include #define BUFSIZE (4*1024) #define MAX ((32*1024*1024)/BUFSIZE) #define MAXR 2147483647 char buf[BUFSIZE]; char cbuf[BUFSIZE]; int main ( int argc, char **argv ) { int r, rc; double dr; time_t seed; int f; memset ( buf, 0x1A, BUFSIZE ); memset ( cbuf, 0x1A, BUFSIZE ); f = open ( argv[1], O_RDWR ); if ( f == -1 ) { perror ( "open" ); exit ( 1 ); } seed = time ( NULL ); while ( 1 ) { r = random ( ); dr = (double)r/(double)MAXR; r = (int)( (double)dr * (double)MAX); #ifdef DEBUG printf ( "block %d\n", r ); #endif rc = lseek ( f, r * BUFSIZE, SEEK_SET ); if ( rc == -1 ) { perror ( "write lseek" ); exit ( 2 ); } rc = write ( f, buf, BUFSIZE ); if ( rc != BUFSIZE ) { perror ( "write" ); exit ( 3 ); } rc = lseek ( f, r * BUFSIZE, SEEK_SET ); if ( rc == -1 ) { perror ( "read lseek" ); exit ( 4 ); } rc = read ( f, cbuf, BUFSIZE ); if ( rc != BUFSIZE ) { perror ( "read" ); exit ( 5 ); } if ( memcmp ( buf, cbuf, BUFSIZE ) ) { fprintf ( stderr, "memcmp\n" ); exit ( 6 ); } } close ( f ); return ( 0 ); }