From owner-freebsd-current@freebsd.org Mon Sep 14 16:52:35 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF7C03DBF6C for ; Mon, 14 Sep 2020 16:52:35 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bqsq660RDz3yPw; Mon, 14 Sep 2020 16:52:34 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-oi1-x235.google.com with SMTP id y6so580956oie.5; Mon, 14 Sep 2020 09:52:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w2+1HRTp3F8LyYTzgkfxQzq+HpQS1Mbqgm2tMltZWbA=; b=iosCRaS4ev3KKSBguCmdmRVBuo2ibsYIUqao1TKxDMe4i4LFzBMI4gVoE9KZSp7XHy Nvh3V8cxQy2UG0IdtFZx16DPzUrX9QsSSrKATb3hcy9DcSr4zoJoYb+UY6dDHozOyjVq ZgQWpQeUOCpeW/XN6KcM0iSGQ5Q6LFnv/1hMx5IxeFE5W3Q1R1d582lus2u8MBlcaR15 P7sU7jgfbZhmHlbRuyXIF8y0OeJ7QZXjnUUtLYkpImwPo3qDCBWpmv9711vGK8UQU5jg NaKpnFiM72d+ln/tRLcFgbiUKa741C6FT2J5uX+d+diu0feEY2M4FiiHJKxdOgP3fIg+ Sn1A== X-Gm-Message-State: AOAM532+UY1+/RMSMlF6kvrdtXVbeOklNtpLY5lBriRIfAlV4jsLuZ3+ iWNlxD6ohrwI0H0UmApAjkGugLBx7NbSEwOPQ3FMsQiMzt0NEQ== X-Google-Smtp-Source: ABdhPJz8v4WU7FCKrMn2wFiRfCGkKc/sLuvm5F0D8zPYMcDamY9+x61klMlGFaxjJ6E/DYBMTCkZEGVdtPDItDXwLY8= X-Received: by 2002:aca:d946:: with SMTP id q67mr189612oig.27.1600102353352; Mon, 14 Sep 2020 09:52:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Mon, 14 Sep 2020 09:52:17 -0700 Message-ID: Subject: Re: Panic with wifi + usb in latest FreeBSD-current To: Adrian Chadd Cc: Warner Losh , FreeBSD Current , Hans Petter Selasky , "Bjoern A. Zeeb" X-Rspamd-Queue-Id: 4Bqsq660RDz3yPw X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.08 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.90)[-0.896]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.001]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.987]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::235:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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: Mon, 14 Sep 2020 16:52:35 -0000 On Sun, Sep 13, 2020 at 11:31 PM Adrian Chadd wrote: > On Sun, 13 Sep 2020 at 22:34, Warner Losh wrote: > > > > > > > On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd > > wrote: > > > >> Yeah, this was also reported in #freebsd-wireless today. > >> > >> Is there a lock being held in the rtwn path that shouldn't be? > >> > > > > I'll check in the morning... this was like the 20th thing to go wrong > this > > weekend, so I copied the panic down, send the email and grabbed a beer > and > > turned it off... > > > > Ok. I checked the driver and the usb stack; nothing in the change lists > obviously stands out to me at 11pm on a Sunday. > > Can you see if any locks are held? or an epoch? Something smells fishy. > (defining EPOCH_TRACE will dump the list of epochs, if I'm reading the > subr_sleepqueue.c code correctly.) > > Ok, so, since I dug a bit more on a hunch, I bet the NET epoch is being > held - it's grabbed in rtwn_bulk_rx_callback, and rtwn_rx_common is reading > some registers as part of processing the receive queue. I bet that act of > reading registers over blocking USB is causing things to explode. > > If it is net epoch then we're going to have to think of a better design > pattern here to migrate all of these here wifi drivers to, because I > guarantee you they're all behaving poorly in this newer world order. > > > > Thanks, > > > -adrian > While I have not seen panics, performance of my rtwn has simply cratered. Trying to move files to my new laptop, which has an rtwn, it crawls at about 1.5 Mbps. Before I built an updated kernel, I was seeing 60M. Of course, this is complicated by the continual kernel lockups I keep getting, so I really didn't think much about it until I saw Warner's note. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683