From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 3 01:14:36 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C20516A42B for ; Sun, 3 Jul 2005 01:10:39 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85E4A43D1D for ; Sun, 3 Jul 2005 01:10:39 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j631AdRw020509 for ; Sun, 3 Jul 2005 01:10:39 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j631Acu0020508; Sun, 3 Jul 2005 01:10:38 GMT (envelope-from gnats) Date: Sun, 3 Jul 2005 01:10:38 GMT Message-Id: <200507030110.j631Acu0020508@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Cc: Subject: Re: kern/78957: time counter per process stops (syscall: getrusage) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2005 01:14:37 -0000 The following reply was made to PR kern/78957; it has been noted by GNATS. From: Bruce Evans To: Jakub Kruszona-Zawadzki Cc: freebsd-bugs@freebsd.org Subject: Re: kern/78957: time counter per process stops (syscall: getrusage) Date: Fri, 18 Mar 2005 20:06:15 +1100 (EST) On Thu, 17 Mar 2005, Jakub Kruszona-Zawadzki wrote: >> Description: > When a process is running for a long time (several days) time counter per process stops on value: > ru_utime.tv_sec:305221 > ru_utime.tv_usec:322735 This may be the same bug as in PR 76972. Overflow occurs at about 48592008 ticks = 379625 seconds = 105 hours for a a process that consumes 100% of the CPU if the statclock frequency is 128 Hz (which is the default and not easy to change). There is another overflow bug at 2^32 ticks = 388 days. This one is harder to fix. See PR 76972 for details and a fix for the first overflow bug. 37965 seconds is a little larger than 305221 seconds. The difference might be due to the other 70000+ seconds being in ru_stime. The behaviour when overflow occurs is undefined, but stopping on a value is quite likely to occur due to the algorithm for updating ru_*time. Integer overflow tends to cause counters to reset to 0 (or INT_MIN), but the kernel enforces monotonicity of the usage times, so they will stick instead of going backwards to 0. Bruce _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"