From nobody@FreeBSD.org  Sat Apr 16 03:28:02 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C873C16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Apr 2005 03:28:02 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A4F7F43D48
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Apr 2005 03:28:02 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j3G3S2S7094050
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Apr 2005 03:28:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j3G3S2Wl094049;
	Sat, 16 Apr 2005 03:28:02 GMT
	(envelope-from nobody)
Message-Id: <200504160328.j3G3S2Wl094049@www.freebsd.org>
Date: Sat, 16 Apr 2005 03:28:02 GMT
From: Arcadiy Ivanov <arcadiy@ivanovy.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ng_mppc_decompress dies with ADAPTIVE_GIANT and PREEMTION
X-Send-Pr-Version: www-2.3

>Number:         79990
>Category:       kern
>Synopsis:       ng_mppc_decompress dies with ADAPTIVE_GIANT and PREEMTION
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 16 03:30:25 GMT 2005
>Closed-Date:    Fri Jun 10 06:49:31 GMT 2005
>Last-Modified:  Fri Jun 10 06:49:31 GMT 2005
>Originator:     Arcadiy Ivanov
>Release:        5.4-RC2
>Organization:
>Environment:
FreeBSD fw1.home.ivanovy.net 5.4-RC2 FreeBSD 5.4-RC2 #0: Fri Apr 15 16:13:59 EDT 2005     administrator@fw1.home.ivanovy.net:/usr/obj/usr/src/sys/DELLGX2  i386

>Description:
If the kernel of 5.3 or 5.4-RC2 is built with either PREEMTION *OR* ADAPTIVE_GIANT options enabled and mpd-3.18_2 is installed, then after pptp connection is established and runs for a certain time the following kernel message is logged:

Apr 15 20:40:58 fw1 kernel: ng_mppc_decompress: too many (4094) packets dropped, disabling node 0xc2248800!

Then connection is not dropped but times out after a while with no traffic going in either direction. The problem is always reproducible.
>How-To-Repeat:
Build a kernel with ADAPTIVE_GIANT or PREEMPTION options enabled.
Install and configure port mpd-3.18_2.
Start mpd daemon.
Establish a connection and begin transfer. After a period of time the above message is always logged and a connection stalls.
>Fix:
Remove PREEMTION and ADAPTIVE_GIANT options from the kernel and add NO_ADAPTIVE_MUTEXES option. Rebuild kernel. Reboot. Launch mpd daemon. No connection drops happen.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->glebius 
Responsible-Changed-By: arved 
Responsible-Changed-When: Fri Apr 22 10:34:52 GMT 2005 
Responsible-Changed-Why:  
glebius is working on locking netgraph. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79990 

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Arcadiy Ivanov <arcadiy@ivanovy.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/79990: ng_mppc_decompress dies with ADAPTIVE_GIANT and PREEMTION
Date: Mon, 16 May 2005 16:51:52 +0400

 --1yeeQ81UyVL57Vl7
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 
   Arcadiy,
 
 can you apply the attached patch, recompile node and report whether this
 helps or not?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
 
 --1yeeQ81UyVL57Vl7
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: attachment; filename="ng_mppc.c.diff"
 
 Index: ng_mppc.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/netgraph/ng_mppc.c,v
 retrieving revision 1.22
 diff -u -r1.22 ng_mppc.c
 --- ng_mppc.c	7 Jan 2005 01:45:39 -0000	1.22
 +++ ng_mppc.c	16 May 2005 12:47:52 -0000
 @@ -223,6 +223,8 @@
  
  	/* OK */
  	*hookPtr = hook;
 +
 +	NG_NODE_FORCE_WRITER(node);
  	return (0);
  }
  
 
 --1yeeQ81UyVL57Vl7--
State-Changed-From-To: open->analyzed 
State-Changed-By: glebius 
State-Changed-When: Fri May 20 07:20:14 GMT 2005 
State-Changed-Why:  
It is suspected than ng_mppc node is not threadsafe. Now submitter 
is testing ng_mppc node forced to be single threaded. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79990 
State-Changed-From-To: analyzed->patched 
State-Changed-By: glebius 
State-Changed-When: Fri Jun 3 08:58:50 GMT 2005 
State-Changed-Why:  
MPPC node declared single threaded. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79990 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Fri Jun 10 06:49:05 GMT 2005 
State-Changed-Why:  
Node marked as single threaded. This fixes problems. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79990 
>Unformatted:
