2011/9/22 <olafbuddenha...@gmx.net>: > Hi, > > While shutting down a subhurd today, I encounted a Mach panic; and I > already encountered a rather similar one once a couple of months ago. > (Might also have been while shutting down subhurd, but I can't say for > sure anymore.) I'm attaching both traces -- perhaps someone gets an > idea. > > Note that the thread state is 14 in one and 114 in the other -- most > likely I simply mistyped it in one of them, as I can only write down the > panic message by hand...
Actually, both numbers can be valid, as the value for TH_SWAPPED flag is 0x100. It seems like a thread has the flags TH_RUN and TH_HALTED, but not TH_SUSP, and thread_invoke doesn't expect this. The only path I found that could lead to this situation, is thread_release or thread_resume being called for a thread with AST_HALT flag before this one is scheduled, as those functions clear TH_HALTED and TH_SUSP flags, without checking for any AST condition.