debugging frequent kernel panics on 8.2-RELEASE

Andriy Gapon avg at FreeBSD.org
Sat Aug 20 16:48:31 UTC 2011


on 20/08/2011 18:51 Steven Hartland said the following:
> ----- Original Message ----- From: "Andriy Gapon" <avg at FreeBSD.org>
> 
>> BTW, I suspect the following scenario, but I am not able to verify it either via
>> testing or in the code:
>> - last process in a dying jail exits
>> - pr_uref of the jail reaches zero
>> - pr_uref of prison0 gets decremented
>> - you attach to the jail and resurrect it
>> - but pr_uref of prison0 stays decremented
>>
>> Repeat this enough times and prison0.pr_uref reaches zero.
>> To reach zero even sooner just kill enough of non-jailed processes.
> 
> I've just checked across a number of the panic dumps from the
> past few days and they all have prison0.pr_uref = 0 which confirms
> the cause of the panic.
> 
> I've tried scripting continuous jail start stops, but even after 1000's
> of iterations have been unable to trigger this on my test machine, so
> I'm going to dig into the jail code to see if I can find out how its
> incorrectly decrementing prison0 via inspection.

Steve,

thanks for doing this!  I'll reiterate my suspicion just in case - I think that
you should look for the cases where you stop a jail, but then re-attach and
resurrect the jail before it's completely dead.

-- 
Andriy Gapon


More information about the freebsd-stable mailing list