From owner-freebsd-stable@FreeBSD.ORG Mon Sep 30 00:58:16 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1101B530; Mon, 30 Sep 2013 00:58:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD222163; Mon, 30 Sep 2013 00:58:15 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id t60so4664066wes.8 for ; Sun, 29 Sep 2013 17:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=optvCNqT1lqKaFG8LnJtTy6hLRDeGfLomFjyZRzRSNs=; b=XR9drJBhJvEXB5mBrZrCJtJFeIf93Dua+9dyXBb07/wakmPVqsCe/K+ZzfGWDruLiA SihHspuvKLuNgZkp8tT8mABXq8mxNVNK4Jb1xYKhJJZUk9giHo4PDBJQpgr1W5i9tTkl KV3XnnwcOADBhOvNMHJlv0EOxlDPDL/kSH3hdZ/WQ9AcHbENYVaQ/E1M8wGO7nKzgu0a UuWl+/aLoeRAGNAfaHyIX3yqZnZvB+kEMWiLagLq4472O41JtlsiX1k9KFWkc9o4arQJ iqm80ZWtolEEmQrGgCe1oORnboBwl/ifJ6iUluG8lGsigQVCBn4Pshbhgc4oPprEt6RB Kq8w== MIME-Version: 1.0 X-Received: by 10.180.10.136 with SMTP id i8mr11554796wib.46.1380502693853; Sun, 29 Sep 2013 17:58:13 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sun, 29 Sep 2013 17:58:13 -0700 (PDT) In-Reply-To: <20130929170346.GA24786@regency.nsu.ru> References: <20120507035405.GA47351@regency.nsu.ru> <20120619052810.GA40402@regency.nsu.ru> <201207041851.56283.bschmidt@freebsd.org> <20130929170346.GA24786@regency.nsu.ru> Date: Sun, 29 Sep 2013 17:58:13 -0700 X-Google-Sender-Auth: Q-0ii0H7nAce2hUB8B0MFyJUQqw Message-ID: Subject: Re: panic with if_iwi(4) upon "netif restart" From: Adrian Chadd To: Alexey Dokuchaev Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Stable Mailing List , Bernhard Schmidt X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 00:58:16 -0000 Sure, uhm, just remind me to commit it to -HEAD in the next few days. Then I'll get it backported to stable/9. Thanks, -adrian On 29 September 2013 10:03, Alexey Dokuchaev wrote: > On Wed, Jul 04, 2012 at 06:51:56PM +0200, Bernhard Schmidt wrote: > > On Tuesday 19 June 2012 07:28:11 Alexey Dokuchaev wrote: > > > On Mon, May 07, 2012 at 08:28:50PM +0200, Bernhard Schmidt wrote: > > > > does "ps" in kgdb reveal multiple instances of wpa_supplicant > running? > > > > If so, this seems to be the well known devd+netif+supplicant+newstate > > > > race/missing refcount. > > > > > > > > Wanna try attached patch? > > > > > > Bernhard, > > > > > > Sorry it took so long to get back. With your patch applied, I haven't > > > seen this panic for a while, however, double instances of > wpa_supplicant > > > still persist. So I think you can commit it, but underlying race > remains > > > to be fixed. > > > > Ok, thanks. The patch is indeed supposed to only fix the panics. > > > > The underlying problem is that a "netif restart" results in 2 > > calls to "netif wlan0 start", one through the call itself the other > > due an event sent to devd. wpa_supplicant itself has a small window > > were it is possible that 2 instances are attached to one resource. > > I have yet to find a solution for this without adding any regressions. > > Funny thing: I've just tried 9-stable on this laptop of mine, and it > paniced immediately inside iwi_auth_and_assoc() again once I've run > wpa_supplicant (this time I did not do any of "netif restart" dances). > > Applying the same patch fixed it for me and allowed to have working > network (typing through it right now). > > Haven't tried -current yet, but it looks like iwi(4) is unusable at least > in 9.2. Can we have this patch committed while real solution is being > worked on? It looks like it's going to take a while, and I'd like to have > working iwi(4) like, uhm, now. ;-) > > ./danfe > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >