Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2011 14:51:43 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: kernel: negative sbsize for uid = 0
Message-ID:  <4EE9287F.9060704@FreeBSD.org>
In-Reply-To: <20111214194630.GI53453@dan.emsphone.com>
References:  <4EE29D3F.2030009@gridfury.com> <4EE7C920.3010109@FreeBSD.org> <20111214194630.GI53453@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EE9287F.9060704>