Date: Sun, 3 Aug 1997 13:52:52 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: henrich@crh.cl.msu.edu (Charles Henrich) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: tty-level buffer overflows Message-ID: <199708032052.NAA02210@phaeton.artisoft.com> In-Reply-To: <19970803010946.06461@crh.cl.msu.edu> from "Charles Henrich" at Aug 3, 97 01:09:46 am
next in thread | previous in thread | raw e-mail | index | archive | help
> I've searched the FreeBSD archives over and over, and all I find is dozens of > complaints of this error (I too am seeing it: > > sio0: 1081 more tty-level buffer overflows (total 3960) > sio0: 526 more tty-level buffer overflows (total 4486) > sio0: 532 more tty-level buffer overflows (total 5018) > sio0: 2784 more tty-level buffer overflows (total 7802) > sio0: 9439 more tty-level buffer overflows (total 17241) > sio0: 677 more tty-level buffer overflows (total 17918) > > But no resolutions.. Because of this I cannot use the serial ports on my > FreeBSD box.. does anyone have any solutions? Use an encapsulation protocol, and you will be able to use the port. Typically, this error is the result of a badly written application servicing data from a bursty connection and/or a busted UART (like the 16550A, which does not issue an interrupt when it should, and makes the data look bursty to the kernel even when it's not). The error message means that your application is not reading from the device as fast as it should; if you have a busted UART, then you will have to be more careful than you would otherwise need to be to keep the kernel buffers emptied and read for new data from the other end of the wire. Is this your own app? Are you possibly doing character-at-a-time I/O, or lots of background processing without servicing the tty port with reads as often as it needs it? If the former, I'd suggest unsetting cbreak, use a vmin of 1, and do *big* reads into your own buffers. If this is a terminal emulator package, switch off to smaller (128 byte) read sizes for interactive use so that it doesn't appear bursty to the user, but keep using large reads for any file transfers. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708032052.NAA02210>