Subject: Re: Why SAs suck, part N
To: None <tech-kern@netbsd.org>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 01/02/2005 19:56:57
So I wasted considerably more than the warranted amount of time on this, and
what I found, at least in one case, is a deadlock. It goes this like this:
1) One thread takes a page fault in pthread_create(). When this happens, it
holds pthread__deadqueue_lock.
2) A sequence of upcalls is pushed on the upcall stacks. The first one to get
into pthread__sched_idle2() wedges there, waiting for
pthread__deadqueue_lock.
3) The upcall chaining code spins forever trying to get the lock, preventing
the thread that's in pthread_create() from running and unlocking the queue.
"Oopsie."