delphij's 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?