From owner-freebsd-questions@FreeBSD.ORG Sat Aug 6 03:52:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE941065673 for ; Sat, 6 Aug 2011 03:52:47 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0928FC12 for ; Sat, 6 Aug 2011 03:52:47 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p763qlDP001541 for ; Fri, 5 Aug 2011 20:52:47 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4E3CBA8E.7060208@rawbw.com> Date: Fri, 05 Aug 2011 20:52:46 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110716 Thunderbird/5.0 MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: top(1) loses process user time count when threads end X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 03:52:47 -0000 I have the process that first runs in 3 threads but later two active threads exit. top(1) shows this moment this way (1 sec intervals): 30833 yuri 3 76 0 4729M 4225M nanslp 4 0:32 88.62% app 30833 yuri 3 76 0 4729M 4225M nanslp 6 0:34 90.92% app 30833 yuri 1 96 0 4729M 4225M CPU1 1 0:03 1.17% app 30833 yuri 1 98 0 4729M 4226M CPU1 1 0:04 12.89% app Process time goes down: 0:34 -> 0:03. Also WCPU goes down 90.92% -> 1.17% even though this process is CPU bound and does intense things right after threads exit. getrusage(2) though, called in the process, shows the correct user time. I think this is the major bug in the process time accounting. 8.2-STABLE Yuri