Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2007 21:46:58 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        attilio@freebsd.org, Robert Watson <rwatson@freebsd.org>, dds@freebsd.org, current@freebsd.org
Subject:   Re: Crash in accounting code: encode_long(), due to bad rusage data?
Message-ID:  <20070820024658.GB46690@dan.emsphone.com>
In-Reply-To: <20070819144903.U568@10.0.0.1>
References:  <20070819214953.I1099@fledge.watson.org> <20070819144903.U568@10.0.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



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