Subject: kern/3362: 3/12/97 ppp has some severe problems
To: None <gnats-bugs@gnats.netbsd.org>
From: Bill Sommerfeld <sommerfeld@orchard.east-arlington.ma.us>
List: netbsd-bugs
Date: 03/20/1997 01:11:46
>Number:         3362
>Category:       kern
>Synopsis:       3/12/97 ppp has some severe problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 19 17:20:00 1997
>Last-Modified:
>Originator:     Bill Sommerfeld
>Organization:
	none
>Release:        19970313
>Environment:
	
System: NetBSD orchard.east-arlington.ma.us 1.2C NetBSD 1.2C (ORCHARD) #18: Thu Mar 13 10:14:46 EST 1997 sommerfeld@orchard.east-arlington.ma.us:/home/inet6/src/sys/compile/ORCHARD i386


>Description:

on 19970312, a new version of the kernel PPP code was dropped into
-current.

There are several problems with this code.

1) zlib.c (included with `options PPP_DEFLATE') doesn't compile due to
an unreferenced static variable.

2) there is at least one path through pppasyncstart() in ppp_tty()
which does an spltty() without a matching splx()

		    s = spltty();
		    if (putc(PPP_ESCAPE, &tp->t_outq))
			break;			<<< ***
		    if (putc(*start ^ PPP_TRANS, &tp->t_outq)) {
			(void) unputc(&tp->t_outq);
			splx(s);
			break;
		    }
		    splx(s);

3) despite fixing 1) and 2), I still got utterly horrible performance
when running PPP over a pty (as a quick&dirty tunnel).  Outbound
packets get "stuck" -- either for several seconds or "permanently",
and eventually the interface queue fills up and no traffic goes
through; clearing the queue with `ifconfig ppp0 down; ifconfig ppp0
up' fixes things for a little while..

>How-To-Repeat:

1) try to build with `options PPP_DEFLATE'

2) inspection

3) try it..  I can provide the code i use to set this up on request.

>Fix:

Unknown.  I don't have time to debug this right now, so I backed out
to the PPP code as of 19970311 which fixed the problem.
>Audit-Trail:
>Unformatted: