From owner-freebsd-current@freebsd.org Tue May 14 15:35:23 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B2921591090 for ; Tue, 14 May 2019 15:35:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E67A771A68; Tue, 14 May 2019 15:35:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9FAB1583D; Tue, 14 May 2019 15:35:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f52.google.com with SMTP id x132so12257379lfd.0; Tue, 14 May 2019 08:35:22 -0700 (PDT) X-Gm-Message-State: APjAAAUzWV1WM5lya9Ju0zGO/pZUhiCvakX5kkuBjNAZVC32uFE3PZT9 uZKH8TyttcrrGqH9qaSFrqh0p/MwtxcaKxoXkh0= X-Google-Smtp-Source: APXvYqzkb/pG1SkqeANI6lJYLmWz78UBIKvwRhlNw0SzlHERHH1KNbmoLplpcKXzpOhLfpC9af52Xx1tIg8iGyr/YQs= X-Received: by 2002:a19:a295:: with SMTP id l143mr16583785lfe.83.1557848121111; Tue, 14 May 2019 08:35:21 -0700 (PDT) MIME-Version: 1.0 References: <20190514151002.GE51157@raichu> In-Reply-To: <20190514151002.GE51157@raichu> From: Kyle Evans Date: Tue, 14 May 2019 10:34:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: panic in tunstart_l2() To: Mark Johnston Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: E67A771A68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 14 May 2019 15:35:23 -0000 On Tue, May 14, 2019 at 10:10 AM Mark Johnston wrote: > > Hi, > > I hit the following panic last night on a non-INVARIANTS kernel at > r347549. The workload involves running a number of bhyve VMs with > frequent restarts, during which a tap interface is destroyed and > recreated. I'm a bit short on time to debug this today, so while I > retry with INVARIANTS on I thought I'd also report the issue in case > anyone else is seeing it. > > The panic occurred because the ifnet's softc field is NULL. Ah, foo. I'll have to re-examine the ioctl/destroy race... tun_destroy grabs the ioctl sx and kills off the if_softc, but it can not and should not do this before if_detach or else things go wrong because it's still a part of the bridge.