Date: Wed, 13 Jun 2012 08:32:03 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: attilio@FreeBSD.org Cc: freebsd-current@FreeBSD.org, onwahe@gmail.com, kaduk@mit.edu Subject: Re: panic td->td_lock == NULL in scheduler(), csup'd 2011-02-19 Message-ID: <201206131532.q5DFW4l0021256@gw.catspoiler.org> In-Reply-To: <CAJ-FndBjbh-KkLrSMgq9Fof=6af8LK6nrXtC%2Be4jeDEVDBEWUw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13 Jun, Attilio Rao wrote: > 2012/6/13, Svatopluk Kraus <onwahe@gmail.com>: >> Hi, >> >> it looks similar to >> http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023829.html > > Yes, that is likely the problem. > However, I would really love to workaround the pid allocation race in > another way than PRS_NEW because this imposes an extra-constraint, > undocumented, on iterations of processes in the system. > If you want to work on a patch for that, you are welcome to do so. A long time ago I had a patch that moved pid allocation and insertion into allproc to a later point in fork1() where the child had been fully initialized. It had two minor disadvantages. The first is that allproc_lock needed to be acquired and released twice. The second is that nprocs and the number of processes in allproc temporarily become inconsistent while the fork is in progress. Eventually the patch conflicts got too bad and I dropped the patch from my local tree.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206131532.q5DFW4l0021256>