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:
- who forks?
- is it the child? the parent?
- why the initialization is not completed with a wrong result?