From owner-freebsd-net@FreeBSD.ORG Wed Sep 29 23:59:25 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 852AC16A4CE for ; Wed, 29 Sep 2004 23:59:25 +0000 (GMT) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CE1343D45 for ; Wed, 29 Sep 2004 23:59:25 +0000 (GMT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from ocean.jinmei.org (unknown [2001:4f8:3:bb:200:39ff:fed7:e2e4]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id C21921525D; Thu, 30 Sep 2004 08:59:22 +0900 (JST) Date: Thu, 30 Sep 2004 08:59:21 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: snap-users@kame.net In-Reply-To: References: User-Agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: (KAME-snap 8818) Re: Weird memory exhaustion with FreeBSD 4.10-STABLE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 23:59:25 -0000 >>>>> On Wed, 29 Sep 2004 11:40:23 +0300 (EEST), >>>>> Pekka Savola said: >> >> Okay. Now I think I figure out the problem. Those host routes were >> >> created not deliberately, so the kernel will eventually need a fix to >> >> this. >> >> >> >> But if you are in a hurry and/or cannot replace the kernel soon, I >> >> think setting net.inet6.ip6.rtexpire to 0 can be a workaround (with >> >> this you even do not have to reboot the kernel - though rebooting may >> >> also help if you can). >> >> > Warning: this freezed the system immediately [all network connectivity >> > broke, and I had to do a quick reset]. Maybe I should have set it up >> > at reboot before the system was in a 'bad' shape.. >> >> Sorry for the trouble, but could you be more specific on "freeze"? >> Does it mean the kernel hanged (you could not type anything from the >> keyboard, etc)? > Unfortunately, I can't. The when my SSH session froze, and the 6to4 > SSH sessions as well, my first instinct was 'oh, crap', and knee-jerk > push of reset button (because the box has no keyboard attached). Sorry > for being inprecise. Okay, I just found a bug that only happens when ip6.rtexpire is 0. Please try the following patch (with rtexpire=0). JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp Index: in6_rmx.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/in6_rmx.c,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 in6_rmx.c --- in6_rmx.c 28 Apr 2002 05:40:27 -0000 1.1.2.3 +++ in6_rmx.c 29 Sep 2004 23:57:07 -0000 @@ -270,10 +270,16 @@ rt->rt_flags |= RTPRF_OURS; rt->rt_rmx.rmx_expire = time_second + rtq_reallyold; } else { + struct rtentry *dummy; + + /* + * rtrequest() would recursively call rtfree() without the + * dummy entry argument, causing duplicated free. + */ rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt), rt->rt_gateway, rt_mask(rt), - rt->rt_flags, 0); + rt->rt_flags, &dummy); } }