From owner-freebsd-current@FreeBSD.ORG Fri Feb 28 12:36:33 2014 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AF0AE62; Fri, 28 Feb 2014 12:36:33 +0000 (UTC) Received: from zcs03.jnb1.cloudseed.co.za (zcs03.jnb1.cloudseed.co.za [41.154.0.139]) by mx1.freebsd.org (Postfix) with ESMTP id 91C4716DE; Fri, 28 Feb 2014 12:36:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zcs03.jnb1.cloudseed.co.za (Postfix) with ESMTP id 865662B43B9B; Fri, 28 Feb 2014 14:27:25 +0200 (SAST) X-Virus-Scanned: amavisd-new at zcs03.jnb1.cloudseed.co.za Received: from zcs03.jnb1.cloudseed.co.za ([127.0.0.1]) by localhost (zcs03.jnb1.cloudseed.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JaljLzIU3oWd; Fri, 28 Feb 2014 14:27:25 +0200 (SAST) Received: from clue.co.za (l2tp.clue.co.za [41.154.88.20]) by zcs03.jnb1.cloudseed.co.za (Postfix) with ESMTPSA id BF9362B429EF; Fri, 28 Feb 2014 14:27:24 +0200 (SAST) Received: from localhost ([127.0.0.1] helo=zen) by clue.co.za with esmtp (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WJMXD-0000bR-8C; Fri, 28 Feb 2014 14:27:23 +0200 To: Hiroki Sato From: Ian FREISLICH Subject: Re: netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory In-Reply-To: <20140224.130924.1512809959333112659.hrs@allbsd.org> References: <20140224.130924.1512809959333112659.hrs@allbsd.org> X-Attribution: BOFH Date: Fri, 28 Feb 2014 14:27:23 +0200 Message-Id: Cc: current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 12:36:33 -0000 Hiroki Sato wrote: > ia> Hiroki Sato wrote: > ia> > Hm, how about the attached one? > ia> > > ia> > I think the cause is just a race when length of the sysctl's output > ia> > is changed in kernel after the buffer allocation in userspace, not > ia> > memory shortage. Size of the routing table can quickly change. > ia> > ia> You are correct. It's growing at about 9000 entries per second (I > ia> wish it were faster). > ia> > ia> This is what the output looks like now. I guess I'm not the average > ia> case. > > Can you try the attached patch? It will attempt to enlarge the > buffer every retry. I think the routing table grows too fast. It still fails. Ian -- Ian Freislich