Re: A page fault in subr_turnstile.c:propogate_priority()

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 03 Dec 2003 15:12:37 -0500 (EST)
On 03-Dec-2003 Igor Sysoev wrote:
> On Wed, 3 Dec 2003, John Baldwin wrote:
> 
>> On 03-Dec-2003 Igor Sysoev wrote:
>> > On Wed, 3 Dec 2003, John Baldwin wrote:
>> > 
>> >> 
>> >> On 03-Dec-2003 Igor Sysoev wrote:
>> >> > On Wed, 3 Dec 2003, John Baldwin wrote:
>> >> > 
>> >> >> On 03-Dec-2003 Brian F. Feldman wrote:
>> >> >> > Igor Sysoev <is_at_rambler-co.ru> wrote:
>> >> >> >> I'd cvsup'ed 5.1-CURRENT from 2003.11.04.02.02.00 up to
>> >> >> >> 2003.11.28.00.00.00 with the turnstile support and it can still
>> >> >> >> causes sometimes a page fault in propogate_priority().
>> >> >> >> I have core dump and can send debug output.
> 
>> Both faults are a trap 12 page fault with a faulting va of 0xe5
>> because td1 is NULL in priority propagation.  Try this change to
>> get a better cashdump that can be analyzed:
>> 
>> Index: subr_turnstile.c
>> ===================================================================
>> RCS file: /usr/cvs/src/sys/kern/subr_turnstile.c,v
>> retrieving revision 1.134
>> diff -u -r1.134 subr_turnstile.c
>> --- subr_turnstile.c    12 Nov 2003 23:48:42 -0000      1.134
>> +++ subr_turnstile.c    3 Dec 2003 17:48:02 -0000
>> _at__at_ -254,6 +254,7 _at__at_
>>                 }
>>  
>>                 td1 = TAILQ_PREV(td, threadqueue, td_lockq);
>> +               MPASS(td1 != NULL);
>>                 if (td1->td_priority <= pri) {
>>                         mtx_unlock_spin(&tc->tc_lock);
>>                         continue;
>> 
>> Then print 'td' and '*ts' in gdb from the priority_propagation()
>> frame and mail the output.
> 
> With a patch from http://www.FreeBSD.org/~jhb/patches/turnstile.patch
> I can not even rebuild kernel. Can I add MPASS to sources from
> 2003.11.28.00.00.00 ?

Ok, I've just updated turnstile.patch again.  I was testing a bogus
condition in my earlier patch. :/  This patch has survived for a while
now on my test machine that was panic'ing with the earlier patch, so
try giving this patch a try against stock CVS sources and see if it
clears up all your panics.  Thanks.

-- 

John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Received on Wed Dec 03 2003 - 11:12:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC