From owner-freebsd-current@FreeBSD.ORG Thu Jun 1 20:42:35 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 3EC7E16BB50; Thu, 1 Jun 2006 20:42:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6701F43D78; Thu, 1 Jun 2006 20:42:08 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [131.106.58.208] (72-255-64-173.client.stsn.net [72.255.64.173]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k51Kg4T5081134; Thu, 1 Jun 2006 16:42:06 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 1 Jun 2006 14:38:58 -0400 User-Agent: KMail/1.9.1 References: <53cc795f0605290205r1b1a898fm718188d767f68403@mail.gmail.com> <200605291510.20703.max@love2party.net> In-Reply-To: <200605291510.20703.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200606011438.59989.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1505/Thu Jun 1 14:29:37 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Max Laier , Robert Watson , sekes Subject: Re: kernel panic. pppoe X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 20:42:59 -0000 On Monday 29 May 2006 09:10, Max Laier wrote: > On Monday 29 May 2006 11:05, sekes wrote: > > Cause my message has been lost in threads i repost it again here. > > > > http://lists.freebsd.org/pipermail/freebsd-current/2006-May/062955.html > > Sorry for annoying :-) > > > > Strange panic occurs in the kernel every time i'm trying to make PPPoE > > connection > > This problem is very important to me because since all that time it > > presents in the kernel i am not able to establish any succesfull intern= et > > sessions longer than on 10-15 minutes:( > > > > panic: mutex Giant not owned at /usr/src/sys/net/if.c:2209 > > cpuid =3D 0 > > KDB: enter: panic > > [thread pid 11 tid 100005 ] > > Stopped at kdb_enter+0x2b: nop > > db> > > db> > > db> > > db> bt > > Tracing pid 11 tid 100005 td 0xc28916c0 > > kdb_enter(3230725374) at kdb_enter+43 > > panic(3230722033,3230813051,3230769714,2209,3264851968) at panic+295 > > _mtx_assert(3231693000,1,3230769714,2209) at _mtx_assert+102 > > if_start(3264851968) at if_start+38 > > ether_output_frame(3264851968,3265936896,3265938176,0,3270958224) at > > ether_output_frame+384 > > ng_ether_rcvdata(3270304512,3270958224,1717,3231718100,0) at > > ng_ether_rcvdata+308 > > ng_apply_item(0,3265938176,5,0,0) at ng_apply_item+278 > > ng_snd_item(3270958224,0,3270958224,3266710848,3270315648) at > > ng_snd_item+230 > > pppoe_ticker(3270315648,3270304384,0,0,3227049343) at pppoe_ticker+229 > > ng_apply_item(1,622,2,1,0) at ng_apply_item+495 > > ng_snd_item(3270958272,0,3548757204,3228176966,3270958272) at > > ng_snd_item+230 > > ng_callout_trampoline(3270958272) at ng_callout_trampoline+13 > > softclock(0) at softclock+518 > > ithread_execute_handlers(3263761156,3263960576) at > > ithread_execute_handlers+234 > > ithread_loop(3263596944,3548757304) at ithread_loop+103 > > fork_exit(3228039632,3263596944,3548757304) at fork_exit+164 > > fork_trampoline() at fork_trampoline+8 > > --- trap 1, eip =3D 0, esp =3D 3548757356, ebp =3D 0 --- >=20 > Looks like you have a NIC that still requires the Giant lock around the=20 > network stack and you found a callpath that does not pick it up. As a=20 > workaround you can try to disable the mpsafe networking (debug.mpsafenet= =3D0),=20 > be sure to tell us if that helps and examine "ifp" in the if_start frame = if=20 > possible. =46rom the dmesg from his first post in the URL mpsafenet is already set to= 0. =20 I bet this netgraph callout is marked MPSAFE and needs to use=20 NET_LOCK_GIANT(). I'm not sure if it should be invoking a driver's=20 if_start() routine from a callout btw. You can try this patch: Index: ng_base.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/cvs/src/sys/netgraph/ng_base.c,v retrieving revision 1.122 diff -c -r1.122 ng_base.c *** ng_base.c 12 Jan 2006 22:41:32 -0000 1.122 =2D-- ng_base.c 1 Jun 2006 18:38:07 -0000 *************** *** 3581,3587 **** =2D-- 3581,3589 ---- { item_p item =3D arg; =20 + NET_LOCK_GIANT(); ng_snd_item(item, 0); + NET_UNLOCK_GIANT(); } =20 =20 =2D-=20 John Baldwin