From owner-freebsd-net@FreeBSD.ORG Sun Oct 18 06:28:38 2009 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4451106566B; Sun, 18 Oct 2009 06:28:38 +0000 (UTC) (envelope-from inpcb.harsha@gmail.com) Received: from mail-pz0-f134.google.com (mail-pz0-f134.google.com [209.85.222.134]) by mx1.freebsd.org (Postfix) with ESMTP id 9C5458FC14; Sun, 18 Oct 2009 06:28:38 +0000 (UTC) Received: by pzk40 with SMTP id 40so107954pzk.7 for ; Sat, 17 Oct 2009 23:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=jxncqV3dWrDemlA7zkHsXqkop1fqQv4dEUoS432AsMc=; b=bzEXAf7eUGgdG05tK0Y4BrzSU05hssdjas8lTJ5M76ts54jxIbcfYIeYgIWLkumeRb EArsekc/XjIqllLcjeLnqdeUFyg2movleE6ToR2idr0irRfHW0Hmry0QNGwYXG61WyvK m3uECLgz/pwp5mIJszRg4VcPkzU6k149wrZ88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tH4uaYkk6nYR7CgLKTp9CTdszy9N027EXdH5YsTZ21STHLbXFPjJfp0hMIgNLwmSwa AJNJGgdNCn6/gG+uYkuP+q/H4jXwYJOvIzjhf8T9Pk3CzAJtyJcGlH0kqKlKKgp8th+N Zpt83cdvpB8Ua7RXyz3YQFXV6SM5yJd+WGHxU= MIME-Version: 1.0 Received: by 10.140.125.4 with SMTP id x4mr1484669rvc.203.1255847318138; Sat, 17 Oct 2009 23:28:38 -0700 (PDT) In-Reply-To: References: Date: Sat, 17 Oct 2009 23:28:38 -0700 Message-ID: From: Harsha To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org, net@freebsd.org Subject: Re: Page fault in IFNET_WLOCK_ASSERT [if.c and pccbb.c] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2009 06:28:38 -0000 Hi Robert, Apologies for not getting earlier. On Mon, Oct 12, 2009 at 6:46 AM, Robert N. M. Watson wrote: > > Looks like a NULL pointer dereference, so perhaps a more traditional bug -- > could you convert ifindex_alloc_locked+0x71 to a line of code? You can do > this using kgdb on the kernel symbols file, perhaps "l > *ifindex_alloc_locked+0x71". It is the for loop in ifindex_alloc_locked() function- for (idx = 1; idx <= V_if_index; idx++) idx is a local variable, so I figured it is V_if_index is what is causing the page fault. It does look like a NULL pointer reference - I see that V_if_index comes from that vnet instance's value and uses the macro VNET_VNET_PTR() down the chain. Since the call chain is coming from a new thread cbb_event_thread, I believe that this thread's vnet context needs to be set using CURVNET_SET(). I'll try this tomorrow, but if think I'm not on the right track or want me to try something else please let me know. Many thanks, Harsha