Subject: com(4) or tty(4) problem in NetBSD 1.6 and above?
To: None <tech-kern@NetBSD.org>
From: Matthias Scheler <tron@zhadum.de>
List: tech-kern
Date: 03/30/2004 21:29:34
	Hello,

I'm currently investigating this PR:

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=18799

I cannot reproduce the problem reported by Jeremy but the problem
reported by Tomasz: big FTP transfers over FTP hang after a while.

To debug the problem I played with my old tun(4) based userland
SLIP implementation and experienced the same problem: big FTP
transfers over SLIP hung after a while. I spent hours to search
for bugs in my userland SLIP implementation but didn't find
anything related. After a while it just hangs forever using
poll(2) with POLLIN|POLLOUT on the tty. Surprisingly the stalled
transfer get be restarted if the receiving machine sends a
packet e.g. with ping(8). poll(2) returns POLLIN (and maybe
also POLLOUT) in this case and everything works fine for
some time.

And this point I began to suspect that there's a bug either in com(4)
or tty(4). I therefore configure "kermit" on both machines and started
a file transfer. The transfer is still running but already showed
some interesting results:

 Communication Speed: 115200
[...]
        Packet Count: 18487
       Packet Length: 712
         Error Count: 29
          Last Error: Timeout 3 sec

There were 29 timeouts where nothing was sent for 3 seconds which is very
unlikely on a 115200 baud direct serial link between two fast i386 machines.

So I wonder if there's a bug in either com(4) or tty(4) which could
cause this.

Opinions?

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/