sched_4bsd startup crash trying to run a bound thread on an AP
that hasn't started
jhb at freebsd.org
Wed Apr 6 12:45:13 UTC 2011
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.
More information about the freebsd-current