delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

26 Jun 2005

The ULE issue

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?