Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2015 14:03:43 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: fork_findpid() - Fatal trap 12: page fault while in kernel mode
Message-ID:  <20151217120343.GA3625@kib.kiev.ua>
In-Reply-To: <201512161908.tBGJ8286089845@gw.catspoiler.org>
References:  <20151216121000.GV3625@kib.kiev.ua> <201512161908.tBGJ8286089845@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 and I'm pretty sure that I lost it.

I had similar tought for a second as one of the possibilities to fix the
issue, but rejected it outright due to the way the pid allocator works.
The loop which faulted is the allocator, it depends on the new pid being
linked early to detect the duplicated alloc.

What you wrote could be done, but this restructuring requires the separate
pid allocator, and probably it must repeat all quirks and subtle behaviour
of the current algorithm.  But I do not object, PRS_NEW is a trouble
on its own.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151217120343.GA3625>