From owner-freebsd-current@FreeBSD.ORG Tue Feb 22 23:08:05 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74A5416A4CE for ; Tue, 22 Feb 2005 23:08:05 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E9BD43D1D for ; Tue, 22 Feb 2005 23:08:04 +0000 (GMT) (envelope-from avleeuwen@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so570023rnf for ; Tue, 22 Feb 2005 15:08:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=LhQbj/wuAcuCsLjJNlGtomzyd4gsVnxS5l7/e2IrkXDkZ/9Aif54xmYf09G1cHNLQmf2RuXm40ufXPgkuh4UEbOdxInuYy8jZFYfkReykCH+aPI3ZjN81FI3KDb6huIU5rQx+bsoXsHPyJGYravEdzzybicQyhsQLkwK5yV3gPA= Received: by 10.38.164.2 with SMTP id m2mr228294rne; Tue, 22 Feb 2005 15:08:03 -0800 (PST) Received: by 10.38.88.56 with HTTP; Tue, 22 Feb 2005 15:08:03 -0800 (PST) Message-ID: Date: Wed, 23 Feb 2005 00:08:03 +0100 From: Arjan Van Leeuwen To: John Baldwin In-Reply-To: <200502221400.52726.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200502221400.52726.jhb@FreeBSD.org> cc: Jeff Roberson cc: current@freebsd.org Subject: Re: Patches to use local APIC timer cause SCHED_ULE panic at boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Arjan Van Leeuwen List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 23:08:05 -0000 On Tue, 22 Feb 2005 14:00:52 -0500, John Baldwin wrote: > On Monday 21 February 2005 03:35 pm, Arjan Van Leeuwen wrote: > > Hey, > > > > The recently committed patches to use the local APIC timer to drive > > the various kernel clocks on SMP machines (by jhb) panic my SMP system > > at boot when > > 1) SCHED_ULE is used instead of SCHED_4BSD > > 2) INVARIANTS_* and WITNESS_* are disabled (I don't know which one is > > the culprit, but if I enable them all the system doesn't panic). > > > > I can't provide a dump, since (I assume) the hard drive isn't > > initialized yet, but I have a debug kernel if that's useful. > > > > Here is the panic: > > Timecounters tick every 1.000 msec > > panic: Thread not on runq. > > cpuid = 0 > > KDB: enter: panic > > [thread pid 0 tid 0] > > Stopped at kdb_enter+0x30: leave > > db> trace > > Tracing pid 0 tid 0 td 0xc0769020 > > kdb_enter(c071398d,0,c07147a2,c0c207d4,c1a12f60) at kdb_enter+0x30 > > panic(c07147a2,369e99,c0769020,1,c0746120) at panic+0x14e > > sched_switch(c0769020,0,2,b43e27c0,87c7fc) at sched_switch+0x85 > > mi_switch(2,0,ffffffff,7fff0000,ffffffff) at mi_switch+0x1d9 > > critical_exit(c0c20888,c0c20890,c06e8dfe) at critical_exit+0xbf > > lapic_handle_timer(0) at lapic_handle_timer+0xf5 > > Xtimerint(c0c20938,c0714fc7,a,61c2091c,c05c4000) at Xtimerint+0x30 > > vsscanf(c0886103,c0714fb3,c0c20a70,c0c20b50,c0564312) at vsscanf+0x1fc > > sscanf(c0886103,c0714fb3,c0c20b24,c0c20a80,c0c20b04) at sscanf+0x1f > > res_find(c0c20bf8,c0c20bd0,c0719124,0,0) at res_find+0x262 > > resource_find(c0c20bf8,c0c20bd0,c0719124,0,0) at resource_find+0x67 > > resource_find_dev(c0c20bf8,c0719124,c0c20bfc,0,0) at resource_find_dev+0x6a > > if_findindex(c1c1ec00,0,0,0,c0703b9c) at if_findindex+0x126 > > if_attach(c1c1ec00,c07044a6,0,0,c074cea0) at if_attach+0x1ac > > lo_clone_create(c074cea0,0,d,0,c074ce88) at lo_create+0x79 > > ifc_simple_create(c074cea0,c0c20cf8,10,c07044a6,0) at > > ifc_simple_create+0x66 ifc_simple_attach(c074cea0,c0718afd,0,0,c0777a20) at > > ifc_simple_attach+0x55 if_clone_attach(c074cea0,c0718d90,0,0,c0c20d80) at > > if_clone_attach+0x1cf loop_modevent(c198b8c0,0,0,c28000,c0c20d80) at > > loop_modevent+0x6a > > module_register_init(c074cef4,c1e000,c1ec00,c1e000,0) at > > module_register_init+0x81 > > mi_startup() at mi_startup+0xb5 > > begin() at begin+0x2c > > (...) > > This doesn't look to be specific to the local APIC timer. The softclock > thread should be on a run queue since it was being preempted to via > critical_exit(). KTR_SCHED traces would probably be helpful. I'm reading up on KTR_SCHED, but before I start trying to do anything with it, will it be able to do anything useful when the system isn't in multi-user yet? I understand from http://www.watson.org/~robert/freebsd/netperf/ktr/ that I'll have to set some sysctls that don't seem to be loader tunables, and I won't be able to run ktrdump. Thanks, Arjan > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org >