:P_WEXIT is set, so the process won't get swapped out. The problem is that :the vmspace refcnt is 0 when swapout_procs is called, since it was :decremented in exit1. The refcnt is incremented before p_flag is tested :for P_WEXIT, the swapout is skipped because its found to be set, and then :vmspace_free is called which decrements the refcnt to 0 and prematurely :frees the vmspace. Decrementing the refcnt in exit1 breaks the normal :refernce count semantics because the vmspace is not being freed then. : :Jake
Yup, I see it. We could just move the P_WEXIT test but I wonder how many other places the vmspace might be bumped and then released. The real bug appears to be in exit1(). I seem to recall we hit this situation a few months ago. I thought it had been fixed. -Matt Matthew Dillon <[EMAIL PROTECTED]> To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message