Subject: bin/5791: ps gets bogus values for kernel processes
To: None <gnats-bugs@gnats.netbsd.org>
From: Ken Raeburn <raeburn@raeburn.org>
List: netbsd-bugs
Date: 07/18/1998 05:04:15
>Number:         5791
>Category:       bin
>Synopsis:       ps gets bogus values for kernel processes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 18 02:20:01 1998
>Last-Modified:
>Originator:     Ken Raeburn
>Organization:
	
>Release:        1998-07-01
>Environment:
	
System: NetBSD kr-pc.cygnus.com 1.3F NetBSD 1.3F (RAEBURN) #0: Thu Jul 9 16:33:34 EDT 1998 root@kr-pc.cygnus.com:/dos/sys.980701/arch/i386/compile/RAEBURN i386


>Description:

I've been seeing this a while, but I'd assumed it was because of
mismatched kernel and user programs.  But I've rebuilt all recently,
from the same source snapshot, and still it persists.

The size measurements for processes 0 and 2 are no good; for other
processes, it looks okay:

$ ps ux$$
USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
raeburn   1794  0.0  0.3   332  172 p4  S     5:00AM    0:00.02 sh 
$ ps ux0
USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
root         0  0.0 -844.4     0 -550172 ??  DLs   3:00AM    0:00.06 (swapper)
$ ps ux1
USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
root         1  0.0  0.1   228   64 ??  Is    3:00AM    0:00.05 /sbin/init 
$ ps ux2
USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
root         2  0.0 -844.4     0 -550172 ??  DL    3:00AM    0:01.53 (pagedaemon)
$ 

I've tried explicitly rebuilding kvm.db, but it makes no difference.

>How-To-Repeat:
	"ps ux0"
>Fix:
	
>Audit-Trail:
>Unformatted: