Subject: kern/36604: top dumps core kvm_getlwp
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <zafer@aydogan.de>
List: netbsd-bugs
Date: 07/04/2007 16:40:00
>Number:         36604
>Category:       kern
>Synopsis:       top  dumps core kvm_getlwp
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 04 16:40:00 +0000 2007
>Originator:     Zafer Aydogan
>Release:        4.99.22
>Organization:
>Environment:
i386
>Description:
If I run top and select p and a pid (for example audacious mp3 player)
and then t to show threads and then exit the application (audacious),
then top dumps core.
It looks like, top tries to get the pid/lwps, after it exited.

load averages:  0.50,  0.23,  0.11                  up 0 days,  0:08   20:39:44
6 threads:     6 sleeping
CPU states: 10.9% user,  0.0% nice,  5.0% system,  0.0% interrupt, 84.2% idle
Memory: 146M Act, 4K Inact, 4180K Wired, 17M Exec, 79M File, 330M Free
Swap:
kvm_open: kvm_getlwps: No such process
Memory fault (core dumped) ATE      TIME   WCPU    CPU COMMAND      NAME
$ 019     1 zafer     -13 lwpwai/0   0:03  0.94%  0.93% audacious   -
 1019     7 zafer     -14 nanosl/0   0:01  0.94%  0.83% audacious   -
 1019     8 zafer     -13 nanosl/0   0:00  0.06%  0.05% audacious   -
 1019     6 zafer       2 poll/0     0:00  0.00%  0.00% audacious   -
 1019     2 zafer     -13 sigwai/0   0:00  0.00%  0.00% audacious   -
 1019     4 zafer     -14 parked/0   0:00  0.00%  0.00% audacious   -

without t, the process just disappears.
>How-To-Repeat:

>Fix:
Yes, please.