From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 12 22:28:09 2013 Return-Path: Delivered-To: freebsd-wireless@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 EACD3143; Mon, 12 Aug 2013 22:28:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58CF8205E; Mon, 12 Aug 2013 22:28:09 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id en1so2300397wid.6 for ; Mon, 12 Aug 2013 15:28:07 -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:content-transfer-encoding; bh=/L5LPvSBauyxIKM1Xb6XBpYwHpnMsgQ/uu54+k7GLnQ=; b=VaR19848OYWTkYfPj1QLJ4dpJkY0f0FeUmT3gltDku79UxqKbi+6r3Pm8BjW02Yx+V i5NC90/Pj6ulqWLvCEgfzt1GrQTZLI8uGUUB0v81r3rBU5XcK5fAQw9MQhLbDK7lnKV0 0WAt8S8UXXQdVh6QDkur5NyBWTnQI6yHCu8BuUTse3t7ZJHXqS2ezqi7Wq4OE8Y9hDJs AbJ4oHjXIef0ooj3ZJLMElhuiaI/7pkHTodvm+hIQCvQvwWDtAcfktkH6ejKmfk6ZmT3 p7h1NPqc7YLEFnKkrZTO8VZ4+x9GcGutpAyZmR1aKC5ZJ0j0sry/ELAKk63cLyk8kXZk gVAg== MIME-Version: 1.0 X-Received: by 10.180.160.165 with SMTP id xl5mr429491wib.46.1376346487675; Mon, 12 Aug 2013 15:28:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Mon, 12 Aug 2013 15:28:07 -0700 (PDT) In-Reply-To: <809218974.20130813013544@serebryakov.spb.ru> References: <238348209.20130812212328@serebryakov.spb.ru> <1391593482.20130812213235@serebryakov.spb.ru> <1769815169.20130812214148@serebryakov.spb.ru> <809218974.20130813013544@serebryakov.spb.ru> Date: Mon, 12 Aug 2013 15:28:07 -0700 X-Google-Sender-Auth: yPdD-Qp-IKAjeTPPXbWnpFrc4GQ Message-ID: Subject: Re: ath as AP panics From: Adrian Chadd To: lev@freebsd.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 22:28:10 -0000 Ugh, I missed another m_nextpkt =3D NULL assignment. Try updating again. Thanks! -adrian On 12 August 2013 14:35, Lev Serebryakov wrote: > Hello, Adrian. > You wrote 12 =C1=D7=C7=D5=D3=D4=C1 2013 =C7., 21:47:46: > >>> AC> Hm. OK. >>> AC> What I want is the code path _in_ that's queuing a frame via >>> AC> ieee80211_vap_transmit() with m_nextpkt set to NON-NULL. >>> I could set breakpoint on "printf()" from patch and get backtrace whe= n it >>> will be hit. Is it enough? > > AC> yup > > db> trace > Tracing pid 0 tid 100037 td 0xfffffe0001a95920 > ieee80211_vap_transmit() at ieee80211_vap_transmit+0x12b/frame 0xffffff81= 2205e950 > pwrsave_flushq() at pwrsave_flushq+0x19f/frame 0xffffff812205e9a0 > hostap_input() at hostap_input+0x8a9/frame 0xffffff812205ea30 > ath_rx_pkt() at ath_rx_pkt+0x3fa/frame 0xffffff812205eaa0 > ath_rx_proc() at ath_rx_proc+0x290/frame 0xffffff812205eb30 > taskqueue_run_locked() at taskqueue_run_locked+0xe6/frame 0xffffff812205e= b80 > taskqueue_thread_loop() at taskqueue_thread_loop+0xa8/frame 0xffffff81220= 5ebb0 > fork_exit() at fork_exit+0x75/frame 0xffffff812205ebf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xffffff812205ebf0 > --- trap 0, rip =3D 0, rsp =3D 0xffffff812205ecb0, rbp =3D 0 --- > > And here are files/lines in r254250 with "printf() patch"): > > // No surprise here :) > (kgdb) list *(ieee80211_vap_transmit+0x12b) > 0xffffffff8059ad6b is in ieee80211_vap_transmit (/data/src/sys/net80211/i= eee80211_output.c:466). > 461 * Complain if m->m_nextpkt is set. > 462 * > 463 * The caller should've pulled this apart for us. > 464 */ > 465 if (m->m_nextpkt !=3D NULL) { > 466 printf("%s: m_nextpkt not NULL?!\n", __func__); > 467 m->m_nextpkt =3D NULL; > 468 } > 469 > 470 /* > (kgdb) list *(pwrsave_flushq+0x19f) > 0xffffffff8059f63f is in pwrsave_flushq (/data/src/sys/net80211/ieee80211= _power.c:477). > 472 > 473 /* VAP frames, aren't encapsulated */ > 474 if (ifp !=3D NULL) { > 475 while (ifp_q !=3D NULL) { > 476 m =3D ifp_q; > 477 ifp_q =3D m->m_nextpkt; > 478 KASSERT((!(m->m_flags & M_ENCAP)), > 479 ("%s: vapq with M_ENCAP frame!\n", __= func__)); > 480 (void) ieee80211_vap_xmitpkt(vap, m); > 481 } > (kgdb) list *(hostap_input+0x8a9) > 0xffffffff80588219 is in hostap_input (/data/src/sys/net80211/ieee80211_h= ostap.c:655). > 650 /* > 651 * For 4-address packets handle WDS discovery > 652 * notifications. Once a WDS link is setup frame= s > 653 * are just delivered to the WDS vap (see below). > 654 */ > 655 if (dir =3D=3D IEEE80211_FC1_DIR_DSTODS && ni->ni= _wdsvap =3D=3D NULL) { > 656 if (!ieee80211_node_is_authorized(ni)) { > 657 IEEE80211_DISCARD(vap, > 658 IEEE80211_MSG_INPUT | > 659 IEEE80211_MSG_WDS, wh, > (kgdb) list *(ath_rx_proc+0x290) > 0xffffffff80308ec0 is in ath_rx_proc (/data/src/sys/dev/ath/if_ath_rx.c:9= 95). > 990 * Process a single frame. > 991 */ > 992 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_D= MASYNC_POSTREAD); > 993 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); > 994 bf->bf_m =3D NULL; > 995 if (ath_rx_pkt(sc, rs, status, tsf, nf, HAL_RX_QU= EUE_HP, bf, m)) > 996 ngood++; > 997 rx_proc_next: > 998 TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); > 999 } while (ath_rxbuf_init(sc, bf) =3D=3D 0); > > > -- > // Black Lion AKA Lev Serebryakov >