From owner-freebsd-hackers Wed May 8 02:52:17 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA21865 for hackers-outgoing; Wed, 8 May 1996 02:52:17 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA21858 for ; Wed, 8 May 1996 02:52:12 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id TAA28588; Wed, 8 May 1996 19:27:35 +0930 From: Michael Smith Message-Id: <199605080957.TAA28588@genesis.atrad.adelaide.edu.au> Subject: Re: serial errors To: cslye@info.infosite.com (Cameron Slye) Date: Wed, 8 May 1996 19:27:34 +0930 (CST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199605080602.XAA25101@info.infosite.com> from "Cameron Slye" at May 7, 96 11:02:12 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Cameron Slye stands accused of saying: > > Seem to be getting these errors with some software we are tring to use... > It is using the port at 115200, and I have set the speed of the device to > 115200 and still seems to happen... This is on a p133 with 32mb, doing > nothing else. So I don't think IO is a problem. Any ideas ? > And I have pages of these errors... TIA. > > > May 7 15:41:59 nfs1 /kernel: sio0: 168 more tty-level buffer overflows (total 43853) > May 7 15:45:21 nfs1 /kernel: sio0: 3051 more tty-level buffer overflows (total 46904) > May 7 15:45:37 nfs1 /kernel: sio0: 184 more tty-level buffer overflows (total 47088) > May 7 15:45:47 nfs1 /kernel: sio0: 72 more tty-level buffer overflows (total 47160) Your application is spending too long doing something else, and not reading from the device often enough. > /* detach from terminal if not debugging */ > if ((!debug) && (!monitor)) > { > if (fork()) > exit(0); > for (i = 10; i >= 0; i--) > (void) close(i); > (void) open("/dev/null", O_RDONLY); > (void) dup2(0, 1); > (void) dup2(0, 2); > i = open("/dev/tty", O_RDWR); > if (i > 0) > { > (void) ioctl(i, TIOCNOTTY, (char *)NULL); > (void) close(i); > } > } daemon() does most of this for you. > for (;;) > { > new_log_file(); /* if needed */ > if (rx_data()) > process_data(); > } process_data() is taking too long, and the device talking to you is not honouring the flow control that the sio driver will desperately be asserting. -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[