Re: Crash in accounting code: encode_long(), due to bad rusage data?

From: Dan Nelson <dnelson_at_allantgroup.com>
Date: Sun, 19 Aug 2007 21:46:58 -0500
In the last episode (Aug 19), Jeff Roberson said:
> On Sun, 19 Aug 2007, Robert Watson wrote:
>> Diomidis, Jeff, Attilio,
>> 
>> I recently upgraded two servers from FreeBSD 6-STABLE to FreeBSD
>> 7-CURRENT in anticipation of the forthcoming release.  Both of them
>> run with accounting enabled at all times.  When a large pine session
>> was exiting on one of the two boxes, I ran into the following panic:
>> 
>> panic: encode_long: -ve value -32749
[..]
>> (kgdb) up
>> #10 0xc0719dc2 in acct_process (td=0xc4a76400)
>>    at /usr/src/sys/kern/kern_acct.c:391
>> 391                     acct.ac_mem = encode_long((ru.ru_ixrss + 
>> ru.ru_idrss
> 
>      ru_idrss     an integral value of the amount of unshared memory
>                   residing in the data segment of a process
>                   (expressed in units of kilobytes *
>                   ticks-of-execution).
> 
> That seems like it's pretty prone to overflow given that this is a 32bit 
> machine.  This may just be an improper assert.  I'm shocked that noone has 
> run into this so far.

You'll also hit this any time you get a "calcru: runtime went
backwards" which on some machines is very frequent.  I disabled the
panic as doon as I upgraded to 7  :)

-- 
	Dan Nelson
	dnelson_at_allantgroup.com
Received on Mon Aug 20 2007 - 00:47:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC