Subject: bin/12265: /bin/ps segfaults on certain list of processes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 02/22/2001 12:07:15
>Number:         12265
>Category:       bin
>Synopsis:       /bin/ps segfaults on certain list of processes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 21 19:08:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        1.5S
>Organization:
	itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.5S NetBSD 1.5S (STARFRUIT) #401: Thu Feb 22 02:11:11 JST 2001 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
Architecture: i386
Machine: i386
>Description:
	with certan processes on memory, /bin/ps sometimes segfaults while
	it parses sysctl-obtained list of processes.  i am yet to get a stable
	way to reproduce it.

(snip)
 18096 ps       RET   __sysctl 0
 18096 ps       CALL  write(0x1,0x80b5000,0x46)
 18096 ps       GIO   fd 1 wrote 70 bytes
       "itojun    328  0.0  0.4   128  1516 E0 S     2:21AM   0:00.05 xclock 
       "
 18096 ps       RET   write 70/0x46
 18096 ps       CALL  __sysctl(0xbfbfc984,0x4,0xbfbfc97c,0xbfbfc980,0,0)
 18096 ps       RET   __sysctl 0
 18096 ps       CALL  __sysctl(0xbfbfc984,0x4,0x80c8000,0xbfbfc980,0,0)
 18096 ps       RET   __sysctl 0
 18096 ps       CALL  write(0x1,0x80b5000,0x4d)
 18096 ps       GIO   fd 1 wrote 77 bytes
       "itojun    327  0.0  0.5   568  1772 E0 S     2:21AM   0:01.10 twm -f .\
	twmrc 
       "
 18096 ps       RET   write 77/0x4d
 18096 ps       CALL  __sysctl(0xbfbfc984,0x4,0xbfbfc97c,0xbfbfc980,0,0)
 18096 ps       RET   __sysctl 0
 18096 ps       CALL  __sysctl(0xbfbfc984,0x4,0x80c8000,0xbfbfc980,0,0)
 18096 ps       RET   __sysctl 0
 18096 ps       PSIG  SIGSEGV SIG_DFL
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: