Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
The attached patch should handle this. It takes out the proc_lock and then updates the process's p_stat, p_waited, and parent's p_nstopchild with the lock held. It then releases the lock. In the normal exit case, it reacquires the lock and restores p_stat to its previous value (which almost

re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
On Sun, 11 Oct 2015, Paul Goyette wrote: On Sun, 11 Oct 2015, matthew green wrote: I'll let the patches run for a while in my local code before I commit (and request pull-ups to NetBSD-7). it would be good to look at netbsd-6 (and maybe -5) too. Yeah, probably. Let me look into it, and

Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Martin Husemann
On Sun, Oct 11, 2015 at 04:39:55AM +0700, Robert Elz wrote: > This in spawn_return() [kern_exec.c] > > There the status of the process is set to SSTOP without incrementing > the parent's p_nstopchild, violating the definition of that field. > But then it is (fairly soon after) set back again ..

Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Greg Troxel
Paul Goyette writes: > Looks like not much has happened here, and all four patches apply > cleanly to > > netbsd-7 > netbsd-6 > netbsd-6-0 > netbsd-6-1 > > IMHO, pull-up to netbsd-6 makes sense, but I'm not sure if we would want > to change things

Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
On Sun, 11 Oct 2015, Paul Goyette wrote: The attached patch should handle this. It takes out the proc_lock and then updates the process's p_stat, p_waited, and parent's p_nstopchild with the lock held. It then releases the lock. In the normal exit case, it reacquires the lock and restores

re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
On Sun, 11 Oct 2015, matthew green wrote: Now that 7.0 has been released, we should soon be moving netbsd-5 to End- Of-Life status with no further updates. So it's probably best to ignore the netbsd-5, -5-0, -5-1, and -5-2 branches. Unless, of course, RelEng is planning additional official

Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
The attached patch should handle this. It takes out the proc_lock and then updates the process's p_stat, p_waited, and parent's p_nstopchild with the lock held. It then releases the lock. In the normal exit case, it reacquires the lock and restores p_stat to its previous value (which almost

Re: building NetBSD-6, -7, or HEAD on NeBSD-5 host (was: Re: Anomalies while handling p_nstopchild count

2015-10-11 Thread Paul Goyette
Updating subject line - please start a new thread! On Mon, 12 Oct 2015, Johnny Billquist wrote: On 2015-10-12 01:33, Paul Goyette wrote: The attached patch should handle this. It takes out the proc_lock and then updates the process's p_stat, p_waited, and parent's p_nstopchild with the lock