Date: Mon, 20 Aug 2007 20:36:03 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: attilio@freebsd.org, dds@freebsd.org, current@freebsd.org Subject: Re: Crash in accounting code: encode_long(), due to bad rusage data? Message-ID: <20070820203420.R97677@fledge.watson.org> In-Reply-To: <20070819145532.O568@10.0.0.1> References: <20070819214953.I1099@fledge.watson.org> <20070819144903.U568@10.0.0.1> <20070819145532.O568@10.0.0.1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 19 Aug 2007, Jeff Roberson wrote: >>> (kgdb) list >>> 386 tmp = ut; >>> 387 timevaladd(&tmp, &st); >>> 388 /* Convert tmp (i.e. u + s) into hz units to match ru_i*. >>> */ >>> 389 t = tmp.tv_sec * hz + tmp.tv_usec / tick; >>> 390 if (t) >>> 391 acct.ac_mem = encode_long((ru.ru_ixrss + >>> ru.ru_idrss + >>> 392 + ru.ru_isrss) / t); >>> 393 else >>> 394 acct.ac_mem = 0; >>> 395 >>> (kgdb) inspect ru >>> $2 = {ru_utime = {tv_sec = 0, tv_usec = 0}, ru_stime = {tv_sec = 0, >>> tv_usec = 0}, ru_maxrss = 509908, ru_ixrss = 26810576, >>> ru_idrss = -2016077424, ru_isrss = 1044992, ru_minflt = 372535, >>> ru_majflt = 42, ru_nswap = 0, ru_inblock = 58, ru_oublock = 278, >>> ru_msgsnd = 1907, ru_msgrcv = 4671, ru_nsignals = 32, ru_nvcsw = 19892, >>> ru_nivcsw = 4614} > > Can you tell me what's in t, tmp, hz and tick? For the benefit of those not present for my conversation with Jeff, here are the values: (kgdb) inspect t $1 = {tv_sec = 94826, tv_usec = 91516} (kgdb) inspect hz $2 = 1000 (kgdb) inspect tick $3 = 1000 (kgdb) inspect tmp $4 = 0 Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070820203420.R97677>