Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Fabian Keil
Fabian Keil wrote: > Konstantin Belousov wrote: > > > On Wed, Dec 16, 2015 at 04:09:17PM +0100, Fabian Keil wrote: > > > Thanks. I'm currently testing the patch on three systems but it may take > > > a while ... > > > > > > > Better

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Don Lewis
On 18 Dec, Mateusz Guzik wrote: > On Thu, Dec 17, 2015 at 02:33:46PM -0800, Don Lewis wrote: >> On 17 Dec, Mateusz Guzik wrote: >> > On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote: >> >> On 17 Dec, Konstantin Belousov wrote: >> >> > On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Mateusz Guzik
On Fri, Dec 18, 2015 at 11:36:44AM +0100, Fabian Keil wrote: > Fabian Keil wrote: > > > Konstantin Belousov wrote: > > > > > On Wed, Dec 16, 2015 at 04:09:17PM +0100, Fabian Keil wrote: > > > > Thanks. I'm currently testing the patch on

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Mateusz Guzik
On Thu, Dec 17, 2015 at 02:33:46PM -0800, Don Lewis wrote: > On 17 Dec, Mateusz Guzik wrote: > > On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote: > >> On 17 Dec, Konstantin Belousov wrote: > >> > On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis wrote: > >> >> I used to have a patch

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Mateusz Guzik
On Fri, Dec 18, 2015 at 09:44:10AM -0800, Don Lewis wrote: > On 18 Dec, Mateusz Guzik wrote: > > On Thu, Dec 17, 2015 at 02:33:46PM -0800, Don Lewis wrote: > >> On 17 Dec, Mateusz Guzik wrote: > >> > On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote: > >> >> On 17 Dec, Konstantin Belousov

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-18 Thread Don Lewis
On 18 Dec, Mateusz Guzik wrote: > On Fri, Dec 18, 2015 at 09:44:10AM -0800, Don Lewis wrote: >> On 18 Dec, Mateusz Guzik wrote: >> > On Thu, Dec 17, 2015 at 02:33:46PM -0800, Don Lewis wrote: >> >> On 17 Dec, Mateusz Guzik wrote: >> >> > On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote:

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-17 Thread Don Lewis
On 17 Dec, Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis wrote: >> I used to have a patch the deferred linking the new process into >> proctree/allproc until it was fully formed. The motivation was to get >> rid of all of the PRS_NEW stuff scattered around the

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-17 Thread Don Lewis
On 17 Dec, Mateusz Guzik wrote: > On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote: >> On 17 Dec, Konstantin Belousov wrote: >> > On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis wrote: >> >> I used to have a patch the deferred linking the new process into >> >> proctree/allproc until

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-17 Thread Konstantin Belousov
On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis wrote: > I used to have a patch the deferred linking the new process into > proctree/allproc until it was fully formed. The motivation was to get > rid of all of the PRS_NEW stuff scattered around the source. > Unfortunately the patch bit-rotted

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-17 Thread Mateusz Guzik
On Thu, Dec 17, 2015 at 11:48:08AM -0800, Don Lewis wrote: > On 17 Dec, Konstantin Belousov wrote: > > On Wed, Dec 16, 2015 at 11:08:02AM -0800, Don Lewis wrote: > >> I used to have a patch the deferred linking the new process into > >> proctree/allproc until it was fully formed. The motivation

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Don Lewis
On 16 Dec, Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 12:21:16PM +0100, Fabian Keil wrote: >> Konstantin Belousov wrote: >> > It is the values of *p and *(p->p_pgrp) that are needed, from the frame 8. >> >> Unfortunately it's not available and apparently I removed

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Fabian Keil
Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 04:09:17PM +0100, Fabian Keil wrote: > > Thanks. I'm currently testing the patch on three systems but it may take a > > while ... > > > > Better use mjg' patch with the small adjustment. I put it below. Will do.

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Fabian Keil
Oliver Pinter wrote: > Is this with latest 11-CURRENT or 10-STABLE? > > Or contains the ad578c311ef commit? The panic is from a system based on 11-CURRENT r290926. Is ad578c311ef a HardenedBSD commit? It doesn't seem to exist in

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Oliver Pinter
Yes, it's a HardenedBSD commit. Currently only a workaround, because I have now lesser time for the real fix in this month. Are you running on ZFS? On Wednesday, December 16, 2015, Fabian Keil wrote: > Oliver Pinter >

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Fabian Keil
Konstantin Belousov wrote: > On Tue, Dec 15, 2015 at 05:42:38PM +0100, Fabian Keil wrote: > > I've seen the following panic a couple of times in the last three > > months, usually while poudriere was running and with sh being the > > current process. > > > > This one is

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Konstantin Belousov
On Wed, Dec 16, 2015 at 12:21:16PM +0100, Fabian Keil wrote: > Konstantin Belousov wrote: > > It is the values of *p and *(p->p_pgrp) that are needed, from the frame 8. > > Unfortunately it's not available and apparently I removed the attempts > to get it from the previous

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Konstantin Belousov
On Tue, Dec 15, 2015 at 05:42:38PM +0100, Fabian Keil wrote: > I've seen the following panic a couple of times in the last three > months, usually while poudriere was running and with sh being the > current process. > > This one is from a system based on r290926 running with > kern.randompid=9001

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Mateusz Guzik
On Wed, Dec 16, 2015 at 02:10:00PM +0200, Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 12:21:16PM +0100, Fabian Keil wrote: > > Konstantin Belousov wrote: > > > It is the values of *p and *(p->p_pgrp) that are needed, from the frame 8. > > > > Unfortunately it's not

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Oliver Pinter
Hi! Is this with latest 11-CURRENT or 10-STABLE? Or contains the ad578c311ef commit? On Tuesday, December 15, 2015, Shawn Webb wrote: > On Tue, Dec 15, 2015 at 05:42:38PM +0100, Fabian Keil wrote: > > I've seen the following panic a couple of times in the last

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Konstantin Belousov
On Wed, Dec 16, 2015 at 02:54:27PM +0100, Mateusz Guzik wrote: > While I agree with analysis the patch does not look right. Since the > struct is only assigned and all locks get dropped, there is nothing > preventing another thread from the forking process to change the process > group. > >

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Konstantin Belousov
On Wed, Dec 16, 2015 at 04:09:17PM +0100, Fabian Keil wrote: > Thanks. I'm currently testing the patch on three systems but it may take a > while ... > Better use mjg' patch with the small adjustment. I put it below. diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Fabian Keil
Oliver Pinter wrote: > Yes, it's a HardenedBSD commit. Currently only a workaround, because I have > now lesser time for the real fix in this month. > > Are you running on ZFS? Yes. Fabian pgpuOBy_BlV8u.pgp Description: OpenPGP digital signature

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-16 Thread Fabian Keil
Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 12:21:16PM +0100, Fabian Keil wrote: > > Konstantin Belousov wrote: > > > It is the values of *p and *(p->p_pgrp) that are needed, from the frame > > > 8. > > > > Unfortunately it's not

fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-15 Thread Fabian Keil
I've seen the following panic a couple of times in the last three months, usually while poudriere was running and with sh being the current process. This one is from a system based on r290926 running with kern.randompid=9001 and forking frequently (>1000 forks/second) due to poudriere and

Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode

2015-12-15 Thread Shawn Webb
On Tue, Dec 15, 2015 at 05:42:38PM +0100, Fabian Keil wrote: > I've seen the following panic a couple of times in the last three > months, usually while poudriere was running and with sh being the > current process. > > This one is from a system based on r290926 running with > kern.randompid=9001