From owner-freebsd-current@FreeBSD.ORG Wed Jan 5 21:44:39 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 77BAE16A4CE; Wed, 5 Jan 2005 21:44:39 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C30843D2D; Wed, 5 Jan 2005 21:44:39 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45])j05LiGoj014628; Wed, 5 Jan 2005 15:44:16 -0600 Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 5 Jan 2005 15:44:09 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 5 Jan 2005 15:43:59 -0600 Message-ID: <41DC5F9D.1040900@savvis.net> Date: Wed, 05 Jan 2005 13:43:57 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Long , Julian Elischer , Roman Kurakin References: <41DB08B9.6090801@savvis.net> <41DB1310.4060807@cronyx.ru> <41DB1700.7060708@savvis.net> <41DB1839.9080104@elischer.org> <41DC4FA2.8070609@savvis.net> <41DC5398.8020508@freebsd.org> <41DC5561.4090005@savvis.net> <41DC5690.3090205@freebsd.org> <41DC598D.50409@savvis.net> <41DC5C5E.9080706@savvis.net> <41DC5D70.5030105@freebsd.org> In-Reply-To: <41DC5D70.5030105@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Jan 2005 21:43:59.0360 (UTC) FILETIME=[AA146800:01C4F36F] X-ECS-MailScanner: No virus is found cc: current@freebsd.org Subject: Re: netgraph(4) initialization order X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 05 Jan 2005 21:44:39 -0000 Scott Long wrote: > Maksim Yevmenkin wrote: > >> [...] >> >>>>> how about new attached patch? >>>>> >>>> >>>> Exactly what I had in mind =-) Have you tested this out to make sure >>>> it fixes the problem cases? >>> >>> >>> >>> i'm building kernel now, but i'm almost certain it will fix the >>> problem. the stack trace i got points to ng_newtype() calling >>> ng_findtype() that wants to mtx_lock(ng_typelist_mtx). i'm pretty >>> sure the ng_typelist_mtx mutex was not initialized, that is >>> ngb_mod_event() was never called. >>> >>> panic: mtx_lock() of spin mutex (null) @ >>> /usr/src/sys/netgraph/ng_base.c:1189 >>> >>> no mutex name and ng_typelist_mtx is *not* a spin mutex. >>> >>> ng_ubt(4) calls ng_newtype() from its mod_event handler, so i think >>> ng_ubt(4) mod_event handler was called before ngb_mod_event(). >> >> >> >> built new kernel (with netgraph and ubt compiled in) and rebooted the >> box. no crash. so patch works. >> >> can i commit it? > > Sounds good, thanks for working on this! I don't think that there are > any API/ABI implications for RELENG_5 that would prevent this from being > merged back, but we might want to think a bit more about it just to be > sure. i can not think of any API/ABI implications for RELENG_5. i will double check anyway. if i will find anything, i will let you guys know. i will wait for Julian and Roman to give me green light and then i will commit it to -current. thanks, max > > Scott