From owner-freebsd-current@FreeBSD.ORG Thu Apr 5 21:34:20 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C20316A404 for ; Thu, 5 Apr 2007 21:34:20 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.236]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECA513C484 for ; Thu, 5 Apr 2007 21:34:20 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so463516wra for ; Thu, 05 Apr 2007 14:34:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=h6xvsIaMSvIGBiz4Tc46yh49vJIne8HJogTduIN1tR4XPeBpEbsEDavjOhEGkDc29asZf3+bWA+Pc9P1vj2BEEP9sM/sT+w1PRF5NEceLBOQP1E3pzMSRzcuU1dOlBaYYxqvstWRm8sVvFmHIF6t/lQbR0juFqV8S/hvXcGTvUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PSh4igqcNLYTM5caGIY2fDSTaWesjXSkJtqy+cMPDZhdZpA9Wl8PWDkAzdWJAlx3GEOj4OzEmN33iHwlcg9GQG4YMTdibImoE/z2fyafxv74W5/bgPiFjk4kBuFPWvDR2Ac8KA0hgGDwJ5qHjrKCmUKjJ3wV3Z8wgrqEAvqaoSE= Received: by 10.115.32.1 with SMTP id k1mr906267waj.1175808858970; Thu, 05 Apr 2007 14:34:18 -0700 (PDT) Received: by 10.114.103.15 with HTTP; Thu, 5 Apr 2007 14:34:13 -0700 (PDT) Message-ID: <2a41acea0704051434p2b8c5902x868d0a5d6510aa01@mail.gmail.com> Date: Thu, 5 Apr 2007 14:34:13 -0700 From: "Jack Vogel" To: freebsd-stable@freebsd.org, freebsd-net , freebsd-current MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Stack panic with em driver unload 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, 05 Apr 2007 21:34:20 -0000 Our test group uses a script that does 100 iterations of a module load, then bring up all interfaces, and then unload driver. Depending on the system in anything from just a few iterations to 20 or more, the system will panic. Its doing an em_detach() which calls ether_ifdetach() which goes to if_detach, in_delmulti_ifp, in_delmulti_locked, and finally if_delmulti(). The panic is always happening on a cmpxchgq instruction so I assume its the LOCK macro, whats odd is that its not always the same reason, sometimes one register is 0 so its a page fault trap, but on other iterations its a general protection fault because the register is some big invalid number :) I am hardpressed to see this as a driver problem, but I'm willing to be proven wrong, does someone who knows the stack code better than me have any insights or ideas? It also appears system dependent, I have a couple machines I've tried to reproduce in on and have been unable. I also am told it happens on both amd64 and i386, but it seems easier to reproduce on the former. Lastly, from evidence so far I think this doesnt happen on CURRENT, but the test group hasnt checked that only I have and I dont have as much hardware :) Cheers, Jack