Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2011 08:36:56 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Ryan Stone <rysto32@gmail.com>
Subject:   Re: sched_4bsd startup crash trying to run a bound thread on an AP that hasn't started
Message-ID:  <201104060836.56542.jhb@freebsd.org>
In-Reply-To: <BANLkTinSyDaY-06N95n8c1NxOSdEnb5FkQ@mail.gmail.com>
References:  <BANLkTinSyDaY-06N95n8c1NxOSdEnb5FkQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, April 04, 2011 5:10:20 pm Ryan Stone wrote:
> I'm running into a bootup crash under sched_4bsd on HEAD.  The crash
> happens when I have a thread bound to a single CPU that isn't the BSP,
> and that thread is scheduled.  If the AP that the thread is bound
> hasn't been started up, kick_other_cpu() crashes because
> pcpu->pc_curthread is NULL for the AP.
> 
> I've put a small test kld in
> http://people.freebsd.org/~rstone/4bsd_bind/ that reproduces the
> problem.  I'm not sure what the best way to address the crash is.  ULE
> is not affected by the problem; it seems to run the swi thread on CPU
> 0 until CPU 1 is running.

Hummm.  Patching 4BSD to use the same route as ULE may be the best solution 
for now if that is easiest.  Alternatively, you could change 4BSD's 
sched_add() to not try to kick other CPUs until smp_started is true.

-- 
John Baldwin



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