From nobody Mon Apr 03 23:18:20 2023 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pr6Jt01hQz43TMf for ; Mon, 3 Apr 2023 23:18:37 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pr6Js1rRDz3Q52; Mon, 3 Apr 2023 23:18:37 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=OduEbPxe; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::b30 as permitted sender) smtp.mailfrom=kob6558@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yb1-xb30.google.com with SMTP id cf7so36787310ybb.5; Mon, 03 Apr 2023 16:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680563916; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zZB8btuiAA3te6vfGxNlnirYnMjEQzGX12hoJnX1F/0=; b=OduEbPxeG8Q+RkCf90CXWrdn+YJgMncXVVTAN3IVBXysRDxvPCj3GXjmHO2eDT+bHt RcuPAK81tFJJODGoF1Qswr9zlxAGmbzSisCmINP5mAapF2mASGNKS9UVPUzxVNWSC3TW gIdibX0KaywRinN4awM/MnZWQ2Ltdduve0W1+kpMqC4oOvwp5K9LesFIHxVVaIwDbYyp TpgyhC5JgHMuui4I++zZ5NWp2eKhrLFR+MlK8170z2YodDHFnWX40OZdFP4asQxlTZ/9 mKtCXA4PyHD6aYJJycpHyzaSMKZJ2jS2qV8IUurv7rzbBGRpbVrUe8vjqDCmMPktl7l2 fcCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680563916; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zZB8btuiAA3te6vfGxNlnirYnMjEQzGX12hoJnX1F/0=; b=V56KZnG5PVw1KknseIXIwaJuXQIQSXOPmJ6e9HcPOWXnnGRHeCxDuxporuj2cp8PBf M2ljKIipPOucXy5pePmjEAPM2E3w83oo9ErZUarALtI3WClPS0ILiveazqmNSwbO++0w WZcpeaNz56v63efk3f5CM2xwU5saq8JsQI5b7ixMZH8GLGK46VEPTOWDH8hc4SnjTfEC Lj7dfT1vNpNHiH+k1Kj+esrr0o5O5fPBUQnx56n1JzijjpK4c1IB20LJms729PuapAsn iAwILl4cCSGzTf3pa/j0kURDhR/60+wHBGgkt/XdzILUrcStu0AsDD45GZkurXNI5A9c 5BXA== X-Gm-Message-State: AAQBX9e6H51WSHortvmz7ONSQYZnFle9kmbSO/yiP96X1OQxbKXnQ8ZN plfo2hsk8dCW6mZCQuQVuIST/yxuna7LrRcmgLsmSqcqJlI= X-Google-Smtp-Source: AKy350azFINylxt5qNX0XpAS3pOxqL7eqDwPfhujK4DTHnOtrYjYnqopjnZBbB4g/6BMZyVbkbTpRwBk9xCGMhmoT9M= X-Received: by 2002:a25:d981:0:b0:b21:a3b8:45cd with SMTP id q123-20020a25d981000000b00b21a3b845cdmr644988ybg.0.1680563916244; Mon, 03 Apr 2023 16:18:36 -0700 (PDT) List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org MIME-Version: 1.0 References: <33qn43q-rn1n-prsr-ppr-p846nq875741@mnoonqbm.arg> In-Reply-To: <33qn43q-rn1n-prsr-ppr-p846nq875741@mnoonqbm.arg> From: Kevin Oberman Date: Mon, 3 Apr 2023 16:18:20 -0700 Message-ID: Subject: Re: Request for testing - firmware crash, wpa, locking To: "Bjoern A. Zeeb" Cc: FreeBSD wireless mailing list Content-Type: multipart/alternative; boundary="000000000000400a3e05f876c7c0" X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[wireless@freebsd.org]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b30:from]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Pr6Js1rRDz3Q52 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000400a3e05f876c7c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 31, 2023 at 1:09=E2=80=AFPM Bjoern A. Zeeb wro= te: > Hi, > > (1) Colin has fixed the panic (after the firmware crash) so many people > keep > seeing. This may mean that you may now (contrary to before) try a > service netif restart wlan0 > to recover from such a crash. This changes is all the way to 13.2. > I am still very pre-occupied with real life but I am hoping that I can > get a possible fix tested and pushed during my Easter "holidays". > > > (2) Along with enweiwu and cy the "startup problem" showing as > "CTRL-EVENT-SCAN-FAILED" was debugged a bit more. We've for now > backed out the rc startup script change and restored the old behaviour > of wpa_supplicant with additional logging. This changes is currently in > main only but will be MFCed to stable/13 in the next week most likely. > If you etcupdate (mergemaster) and pull that change in I would kindly > ask you to turn on debugging for wpa_supplicant and check if you see > any log lines including "(changed)" [beware most should be "(no > change)" along with IFF_UP in the line. If so please contact me. > I still have a hypothesis that we may simply exploit a race in net80211 > there which will need better fixing. > > > (3) if you are using iwlwifi (or rtw88) I just pushed some locking > changes into main. I would appreciate if you could test and let me know > if there are any new regressions (they do not fix the firmware crash > from (1) yet!). > > Lots of health, > /bz > > -- > Bjoern A. Zeeb r15:7 > Bjoern, Just updated to the latest main and received a previously unseen lock order reversal on my iwlwifi when the network came up. This did not prevent the network from starting normally. FreeBSD 14.0-CURRENT #9 main-n261962-41236539d8dd-dirty: Mon Apr 3 13:06:31 PDT 2023 lock order reversal: (sleepable after non-sleepable) 1st 0xfffffe01466a0020 iwlwifi0_com_lo (iwlwifi0_com_lo, sleep mutex) @ /usr/src/sys/net80211/ieee80211_ioctl.c:3552 2nd 0xffffffff81fa9ce0 rtnl cloner lock (rtnl cloner lock, sx) @ /usr/src/sys/netlink/route/iface.c:306 lock order iwlwifi0_com_lo -> rtnl cloner lock attempted at: #0 0xffffffff80c61093 at witness_checkorder+0xbb3 #1 0xffffffff80bfb5b7 at _sx_slock_int+0x67 #2 0xffffffff80e58241 at dump_iface+0x501 #3 0xffffffff80e578cb at rtnl_handle_ifevent+0xab #4 0xffffffff80d70e75 at ieee80211_notify_ifnet_change+0x65 #5 0xffffffff80d9c29f at ieee80211_start_locked+0x6f #6 0xffffffff80d7fd56 at ieee80211_ioctl+0x356 #7 0xffffffff80d1d2d5 at ifhwioctl+0xe05 #8 0xffffffff80d1ecd5 at ifioctl+0x925 #9 0xffffffff80c66cee at kern_ioctl+0x1fe #10 0xffffffff80c66a84 at sys_ioctl+0x154 #11 0xffffffff810e54f0 at amd64_syscall+0x140 #12 0xffffffff810b8b7b at fast_syscall_common+0xf8 I have done no testing, but everything seems to be operating fine. If there is further information I can provide, just let me know. Thanks! --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000400a3e05f876c7c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Mar 31, 2023 at 1:09=E2= =80=AFPM Bjoern A. Zeeb <bz@freebsd.or= g> wrote:
Hi,

(1) Colin has fixed the panic (after the firmware crash) so many people kee= p
seeing.=C2=A0 This may mean that you may now (contrary to before) try a
=C2=A0 =C2=A0 =C2=A0 =C2=A0 service netif restart wlan0
to recover from such a crash.=C2=A0 This changes is all the way to 13.2. I am still very pre-occupied with real life but I am hoping that I can
get a possible fix tested and pushed during my Easter "holidays".=


(2) Along with enweiwu and cy the "startup problem" showing as "CTRL-EVENT-SCAN-FAILED" was debugged a bit more.=C2=A0 We've= for now
backed out the rc startup script change and restored the old behaviour
of wpa_supplicant with additional logging.=C2=A0 This changes is currently = in
main only but will be MFCed to stable/13 in the next week most likely.
If you etcupdate (mergemaster) and pull that change in I would kindly
ask you to turn on debugging for wpa_supplicant and check if you see
any log lines including "(changed)"=C2=A0 [beware most should be = "(no
change)" along with IFF_UP in the line.=C2=A0 If so please contact me.=
I still have a hypothesis that we may simply exploit a race in net80211
there which will need better fixing.


(3) if you are using iwlwifi (or rtw88) I just pushed some locking
changes into main.=C2=A0 I would appreciate if you could test and let me kn= ow
if there are any new regressions (they do not fix the firmware crash
from (1) yet!).

Lots of health,
/bz

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7

Bjoern,

Just = updated to the latest main and received=C2=A0 a previously unseen lock orde= r reversal on my iwlwifi when the network came up. This did not prevent the= network from starting normally.
FreeBSD 14.0-CURRENT #9 mai= n-n261962-41236539d8dd-dirty: Mon Apr =C2=A03 13:06:31 PDT 2023

lock order reversal: (sleepable after no= n-sleepable)
=C2=A01st 0xfffffe01466a0020 iwlwifi0_com_lo (iwlwifi0_com_= lo, sleep mutex) @ /usr/src/sys/net80211/ieee80211_ioctl.c:3552
=C2=A02n= d 0xffffffff81fa9ce0 rtnl cloner lock (rtnl cloner lock, sx) @ /usr/src/sys= /netlink/route/iface.c:306
lock order iwlwifi0_com_lo -> rtnl cloner = lock attempted at:
#0 0xffffffff80c61093 at witness_checkorder+0xbb3
= #1 0xffffffff80bfb5b7 at _sx_slock_int+0x67
#2 0xffffffff80e58241 at dum= p_iface+0x501
#3 0xffffffff80e578cb at rtnl_handle_ifevent+0xab
#4 0x= ffffffff80d70e75 at ieee80211_notify_ifnet_change+0x65
#5 0xffffffff80d9= c29f at ieee80211_start_locked+0x6f
#6 0xffffffff80d7fd56 at ieee80211_i= octl+0x356
#7 0xffffffff80d1d2d5 at if= hwioctl+0xe05
#8 0xffffffff80d1ecd5 at ifioctl+0x925
#9 0xffffffff80c66cee at kern_ioctl+0x1fe#10 0xffffffff80c66a84 at sys_ioctl+0x154
#11 0xffffffff810e54f0 at am= d64_syscall+0x140
#12 0xffffffff810b8b7b at fast_syscall_common+0xf8

I have done no testing, but eve= rything seems to be operating fine.

If t= here is further information I can provide, just let me know.

Thanks!
--
Kevi= n Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
--000000000000400a3e05f876c7c0--