Date: Tue, 18 Feb 2020 11:37:08 -0800 From: Gleb Smirnoff <glebius@freebsd.org> To: Kristof Provost <kp@freebsd.org> Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: vtnet IFF_NEEDSEPOCH? Message-ID: <20200218193708.GH5741@FreeBSD.org> In-Reply-To: <B45B8E77-CDB2-450E-951C-1E6E6BCC2527@FreeBSD.org> References: <B45B8E77-CDB2-450E-951C-1E6E6BCC2527@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 18, 2020 at 10:52:09AM +0100, Kristof Provost wrote: K> Hi, K> K> I’ve been playing around with a risc-v qemu image, and run into this panic K> with vtnet: K> K> DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 5 K> panic: Assertion in_epoch(net_epoch_preempt) failed at K> /usr/src/sys/net/netisr.c:1093 K> cpuid = 0 K> time = 1581981733 K> KDB: stack backtrace: K> db_trace_self() at db_trace_self K> db_fetch_ksymtab() at db_fetch_ksymtab+0x12a K> kdb_backtrace() at kdb_backtrace+0x2c K> vpanic() at vpanic+0x144 K> panic() at panic+0x26 K> netisr_dispatch_src() at netisr_dispatch_src+0x3c0 K> netisr_dispatch() at netisr_dispatch+0x10 K> ether_ifattach() at ether_ifattach+0x2fa K> vtmmio_attach() at vtmmio_attach+0x490c K> vtmmio_attach() at vtmmio_attach+0x4624 K> vtmmio_attach() at vtmmio_attach+0x544a K> virtqueue_intr() at virtqueue_intr+0xc K> vtmmio_attach() at vtmmio_attach+0x2008 K> db_dump_intr_event() at db_dump_intr_event+0x730 K> fork_exit() at fork_exit+0x68 K> fork_trampoline() at fork_trampoline+0xa K> KDB: enter: panic K> [ thread pid 12 tid 100023 ] K> Stopped at kdb_enter+0x44: sd zero,0(a0) K> db> K> K> It seems pretty clear that the vtmmio path doesn’t enter epoch before it K> runs the vtnet_attach() code. K> On the other hand, I run vtnet CURRENT guests in bhyve, and don’t see this K> panic. In that case it lives on top of PCI rather than mmio, but I don’t K> see why/where that’d enter epoch. The transition from ether_ifattach to netisr_dispatch looks strange. Is that something run trough EVENTHANDLER_INVOKE? Can you please print in kgdb? > list *ether_ifattach+0x2fa -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200218193708.GH5741>