Subject: Re: kern/20914: kernel panic in sysctl_procargs()
To: None <netbsd-bugs@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 04/06/2003 00:22:48
>  I don't see how the sysctl procargs can work, without locking anything.
>  what if the process goes away while it retrieves information?


My thoughts exactly...

It does  p->p_vmspace->vm_refcnt++ which might keep the vmspace
active, but then can sleep in malloc() and continues to use 'p'
and p->p_vmspace rather than a local copy of the data.

However in this case I presume that the X server isn't exiting!

The disassembly of sysctl_procargs (matching your failing kernel)
might be enough to identify the failing code (especially the
part at offset ~0x200 in the function)
(objdump -d compile/GENERIC/kern_sysctl.o will give it)

My system doesn't compile an object that matches yours...

I can't quite see how this can be related to the pid allocation code.

	David

-- 
David Laight: david@l8s.co.uk