From owner-freebsd-stable@FreeBSD.ORG Wed Dec 14 22:51:44 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0F95F1065672 for ; Wed, 14 Dec 2011 22:51:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B722F16329A; Wed, 14 Dec 2011 22:51:43 +0000 (UTC) Message-ID: <4EE9287F.9060704@FreeBSD.org> Date: Wed, 14 Dec 2011 14:51:43 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Dan Nelson References: <4EE29D3F.2030009@gridfury.com> <4EE7C920.3010109@FreeBSD.org> <20111214194630.GI53453@dan.emsphone.com> In-Reply-To: <20111214194630.GI53453@dan.emsphone.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: kernel: negative sbsize for uid = 0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2011 22:51:44 -0000 On 12/14/2011 11:46, Dan Nelson wrote: > In the last episode (Dec 13), Doug Barton said: >> I'm running 8.2-RELEASE-p4 i386 on some web servers that are generally >> lightly-moderately loaded, but occasionally see some heavy spikes where >> load average goes way up. When that is happening, but sometimes even when >> it's not, I get hundreds of this message spewing into the logs: >> >> kernel: negative sbsize for uid = 0 >> >> I haven't found anything particularly useful by searching for that >> message, the one reference was to mbufs, but that seems not to be the >> problem. Here is the output of 'netstat -m' during one of the load >> spikes: > [...] >> So is this message something to worry about? If so, how can I diagnose >> what's happening, and how do I fix it? > > I've seen it ocassionally too. The error message is printed in > /sys/kern/kern_resource.c when the ui_sbsize resource counter goes negative. > There's probably insufficient locking somewhere in the functions that call > chgsbsize. The increment/decrement is done atomically, but the data pointed > to by the "hiwat" argument is read then updated later without an explicit > lock, so if that value changes while the function is executing, it could > cause problems. ui_sbsize is only used by the resource limiting code, > though, so unless you're enforcing an sbsize rlimit, it should be harmless. Thanks for the response ... I'll double-check were we might be setting that kind of limit. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/