From owner-freebsd-current@FreeBSD.ORG Fri Feb 21 09:32:42 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 EE7C0C8B; Fri, 21 Feb 2014 09:32:41 +0000 (UTC) Received: from zcs04.jnb1.cloudseed.co.za (zcs04.jnb1.cloudseed.co.za [41.154.0.161]) by mx1.freebsd.org (Postfix) with ESMTP id 24D69167F; Fri, 21 Feb 2014 09:32:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zcs04.jnb1.cloudseed.co.za (Postfix) with ESMTP id 8D8652A8215E; Fri, 21 Feb 2014 11:32:38 +0200 (SAST) X-Virus-Scanned: amavisd-new at zcs04.jnb1.cloudseed.co.za Received: from zcs04.jnb1.cloudseed.co.za ([127.0.0.1]) by localhost (zcs04.jnb1.cloudseed.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0ceVBIWX13pf; Fri, 21 Feb 2014 11:32:37 +0200 (SAST) Received: from clue.co.za (ss.school1319.gp-online.net [41.154.77.214]) by zcs04.jnb1.cloudseed.co.za (Postfix) with ESMTPSA id AD1BC2A8217D; Fri, 21 Feb 2014 11:32:37 +0200 (SAST) Received: from localhost ([127.0.0.1] helo=zen) by clue.co.za with esmtp (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WGmTE-0000nr-Us; Fri, 21 Feb 2014 11:32:36 +0200 To: Hiroki Sato From: Ian FREISLICH Subject: Re: netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory In-Reply-To: <20140221.182037.200669298555875226.hrs@allbsd.org> References: <20140221.182037.200669298555875226.hrs@allbsd.org> <20140221.172017.821481836359198829.hrs@allbsd.org> X-Attribution: BOFH Date: Fri, 21 Feb 2014 11:32:36 +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, 21 Feb 2014 09:32:42 -0000 Hiroki Sato wrote: > Hm, how about the attached one? > > I think the cause is just a race when length of the sysctl's output > is changed in kernel after the buffer allocation in userspace, not > memory shortage. Size of the routing table can quickly change. You are correct. It's growing at about 9000 entries per second (I wish it were faster). This is what the output looks like now. I guess I'm not the average case. [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory 1 [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying 314032 [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying 332293 [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying 340368 [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying 374400 [firewall1.jnb1] ~ # netstat -rn |wc -l netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: Routing table grew, retrying netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory 1 [firewall1.jnb1] ~ # netstat -rn |wc -l 480073 Ian -- Ian Freislich