Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Aug 2009 23:34:17 -0700
From:      Navdeep Parhar <nparhar@gmail.com>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>
Cc:        freebsd-current@freebsd.org, Navdeep Parhar <np@FreeBSD.org>
Subject:   Re: reproducible panic in netisr
Message-ID:  <20090805063417.GA10969@doormat.home>
In-Reply-To: <20090805054115.O93661@maildrop.int.zabbadoz.net>
References:  <20090804225806.GA54680@hub.freebsd.org> <20090805054115.O93661@maildrop.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 05, 2009 at 05:43:17AM +0000, Bjoern A. Zeeb wrote:
> On Tue, 4 Aug 2009, Navdeep Parhar wrote:
> 
> Hi,
> 
> >This occurs on today's HEAD + some unrelated patches.  That makes it
> >8.0BETA2+ code.  I haven't tried older builds.
> 
> We have finally been able to reproduce this ourselves yesterday and

Well, it happens every single time on all of my amd64 machines.
After I'd already sent my email I noticed that the netisr mutex has
an odd address (pun intended :-))

m=0xffffffff8144d867

It's a bit unusual for the mutex struct to start at a completely
unaligned address.  I hope things are better on sparc64 etc., not
everyone is as forgiving as amd64.

The mutex led me to some DPCPU stuff that I didn't quite get.

(kgdb) p/x dpcpu_off
$2 = {0x8407d7, 0xffffff807f4037d7, 0x0 <repeats 30 times>}
(kgdb) p dpcpu
$3 = (void *) 0xffffff8000010000
(kgdb) p &__start_set_pcpu
$4 = (uintptr_t **) 0xffffffff80c0c829
(kgdb) p/x 0xffffff8000010000 - 0xffffffff80c0c829                   
$5 = 0xffffff807f4037d7

It's not clear why we prefer to store offsets from DPCPU_START,
instead of the base address of the dpcpu area directly.  On amd64,
the dpcpu area for cpu 0 is above kernbase (immediately after
kernbase + thread0's stack).  For the other CPUs it's below
kernbase.  This makes the pointer arithmetic that calculates offsets
more "interesting."

Why have a dpcpu_off[] instead of a dpcpu_base[]?

> I might have a patch that I need to discuss with the relevant parties
> first, to confirm that it's correct before circulating another bug as
> patchh, as well as confirm some things with objdump.

I should be able to test it.  As I mentioned I get a page fault
everytime I run NPtcp -h localhost.

Regards,
Navdeep

> 
> /bz
> 
> -- 
> Bjoern A. Zeeb                      The greatest risk is not taking one.
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090805063417.GA10969>