From owner-freebsd-current@freebsd.org Sun Oct 14 00:15:27 2018 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 F1C2510D8E51 for ; Sun, 14 Oct 2018 00:15:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAA88F4A9; Sun, 14 Oct 2018 00:15:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BU42gGj5q5HxqBU43gPmxW; Sat, 13 Oct 2018 18:15:24 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=smKx5t2vBNcA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=6v7tBcRgK_Qy5G9CrXcA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id A1EB8A44; Sat, 13 Oct 2018 17:15:21 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w9E0FKx1048235; Sat, 13 Oct 2018 17:15:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w9E0FKkR048232; Sat, 13 Oct 2018 17:15:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201810140015.w9E0FKkR048232@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Allan Jude cc: freebsd-current@freebsd.org Subject: Re: Strange panic at boot with vmm in loader.conf vs manually loading it In-Reply-To: Message from Allan Jude of "Sat, 13 Oct 2018 12:48:24 -0400." <8f033c7c-af8f-1ebc-d787-548634f104e3@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 13 Oct 2018 17:15:20 -0700 X-CMAE-Envelope: MS4wfPrkPorRK3yQLtlq7x4UvqfJlf/t2XcDDZjdnXqxnz4HiWkrJqlplOF5RJfEEMjmoM9WrSh1Pdy55546WRnKeK4uQsb8ohvdf66Lc1YEN4DJFOB7FHV9 mnqGAkkTLBl3qbupwBRP+h3+SU2YPyzQoPGEEp19m1m1L8+180auLLR2EqK30527ChV7lBoM/LreZe6vhKxGSSXaWPWVeDMF5PJj7CXAi9a1qSuB6+T+TGSJ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Sun, 14 Oct 2018 00:15:27 -0000 In message <8f033c7c-af8f-1ebc-d787-548634f104e3@freebsd.org>, Allan Jude write s: > On 10/12/2018 11:52, Mike Tancsa wrote: > > I am guessing this does not have anything to do with vmm being loaded, > > but hardware being initialized in a particular order? If I load vmm in > > loader.conf, the box panics at boot up.  However, manually loading it > > all seems to work.  Hardware is PRIME X370-PRO, AMD Ryzen 5 1600X 32G > > RAM.  FreeBSD 12.0-ALPHA9 r339328 GENERIC-NODEBUG > > > > > > Leading up to the crash, I see > > > > > > ugen0.1: <0x1022 XHCI root HUB> at usbus0 > > ugen1.1: <0x1b21 XHCI root HUB> at usbus1 > > Trying to mount root from zfs:zroot/ROOT/default []... > > uhub0: ugen2.1: <0x1022 XHCI root HUB> at usbus2 > > Root mount waiting for: usbus2<0x1022 XHCI root HUB, class 9/0, rev > > 3.00/1.00, addr 1> on usbus0 > >  usbus1 usbus0 > > uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2 > > uhub2: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1 > > uhub2: 4 ports with 4 removable, self powered > > uhub1: 8 ports with 8 removable, self powered > > uhub0: 22 ports with 22 removable, self powered > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 0; apic id = 00 > > fault virtual address   = 0x398 > > fault code              = supervisor write data, page not pres > ent > > instruction pointer     = 0x20:0xffffffff8273d776 > > stack pointer           = 0x28:0xfffffe0075d55230 > > frame pointer           = 0x28:0xfffffe0075d55270 > > code segment            = base 0x0, limit 0xfffff, type 0x1b > >                         = DPL 0, pres 1, long 1, de > f32 0, gran 1 > > processor eflags        = interrupt enabled, resume, IOPL = 0 > > current process         = 1 (kernel) > > [ thread pid 1 tid 100002 ] > > Stopped at      rrw_enter_read_impl+0x36:       lock cmpxchgq > > %r14,0x18(%rbx) > > db> bt > > Tracing pid 1 tid 100002 td 0xfffff8000567d580 > > rrw_enter_read_impl() at rrw_enter_read_impl+0x36/frame 0xfffffe0075d55270 > > zfs_mount() at zfs_mount+0x7b2/frame 0xfffffe0075d55400 > > vfs_domount() at vfs_domount+0x5b2/frame 0xfffffe0075d55630 > > vfs_donmount() at vfs_donmount+0x930/frame 0xfffffe0075d556d0 > > kernel_mount() at kernel_mount+0x3d/frame 0xfffffe0075d55720 > > parse_mount() at parse_mount+0x451/frame 0xfffffe0075d55860 > > vfs_mountroot() at vfs_mountroot+0x7a0/frame 0xfffffe0075d559f0 > > start_init() at start_init+0x27/frame 0xfffffe0075d55a70 > > fork_exit() at fork_exit+0x83/frame 0xfffffe0075d55ab0 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0075d55ab0 > > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > db> > > Strange that your crash is in ZFS here... > > Can you take a crash dump? > > It looks like something is trying to write to uninitialized memory here. > I was digging into this before I left on vacation. You can recreate this by, mount -t zfs tank/nonexistent /mnt A nonexistent dataset or zpool triggers the panic. I discovered it by chance through a typo in fstab. The panic occurs with INVARIANTS. Without INVARIANTS results in a hard hang. I got as far as discovering that f_mntfromname pointed to a null string but ran out of time before I left. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.