Subject: port-vax/4043: ps(1) causes panic
To: None <gnats-bugs@gnats.netbsd.org>
From: maximum entropy <entropy@vivax.bernstein.com>
List: netbsd-bugs
Date: 08/26/1997 20:13:44
>Number:         4043
>Category:       port-vax
>Synopsis:       no
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 26 17:20:00 1997
>Last-Modified:
>Originator:     maximum entropy
>Organization:
	
>Release:        <NetBSD-current source date>19970824
>Environment:
	
VAXstation 3100
NetBSD 1.2G (-current, NOT the snapshot, though I think the problem also
exists in the 1.2G snapshot GENERIC kernel)
System: NetBSD vivax.bernstein.com 1.2G NetBSD 1.2G (VIVAX) #1: Tue Aug 26 08:16:48 EDT 1997 root@vivax.bernstein.com:/import/tardis/usr/src/sys/arch/vax/compile/VIVAX vax


>Description:
	
Running ps twice causes a panic.
Please note that this ps is not the one from the 1.2G snapshot -- that
one doesn't work at all (proc size mismatch).  This ps was built from
-current sources via "make build".

IMPORTANT:  This PR supersedes PR#4002.  The information in that PR about
requiring another process performing lots of fork()s turned out to be
a red herring after more testing.

>How-To-Repeat:
	

[19]entropy@vivax:~ $ ps ; ps
  PID TT  STAT      TIME COMMAND
  191 ??  Ss     0:28.24 (bash)
  196 ??  R+     0:05.34 ps 
  PID TT  STAT      TIME COMMAND
[ ... system pauses for about 3 or 4 minutes here ... ]
panic: pmap_remove: pmap not in pv_table
Stopped at      0x80091937:     *clrl   (r6)
db> trace
db_stack_trace_cmd - addr 80091937, have_addr 0, count ffffffff, modif 801b6a5c
db> cont
syncing disks... done

dumping to dev 1401, offset 230827
dump succeeded

?06 HLT INST
    PC = 80092E18
>Fix:
	
Sorry, don't know.

>Audit-Trail:
>Unformatted:
>>> boot
[ ... system boots ... ]
vivax# gdb -k /netbsd
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.11 (vax-netbsd), Copyright 1993 Free Software Foundation, Inc...
(no debugging symbols found)...
(kgdb) x 0x80091937
0x80091937 <pmap_remove+293>:   0x57d4580c