kernel: negative sbsize for uid = 0

Doug Barton dougb at FreeBSD.org
Wed Dec 14 22:51:44 UTC 2011


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/



More information about the freebsd-stable mailing list