The ULE issue

• 本文约 69 字,阅读大致需要 1 分钟 | Development

Now I got (partially) the point:

  • A newly fork’ed thread grabs Giant
  • Subsequently, the mutex procedure will call turnstile_wait
  • However, the td->td_sched->ke_runq is NULL (means that some part of the new thread is not initialized completely)
  • So boom! panic.

Interestingly this does not happen in !PREEMPTION case.

Now my question are:

  1. who forks?
  2. is it the child? the parent?
  3. why the initialization is not completed with a wrong result?