From owner-freebsd-current@freebsd.org Sun Dec 27 14:26:12 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73DF2A4D70E for ; Sun, 27 Dec 2015 14:26:12 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5155614AC for ; Sun, 27 Dec 2015 14:26:11 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x2.osted.lan (87-58-223-204-dynamic.dk.customer.tdc.net [87.58.223.204]) by relay01.pair.com (Postfix) with ESMTP id D4DE5D006AB; Sun, 27 Dec 2015 09:26:04 -0500 (EST) Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id tBREQ2Sh045487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 27 Dec 2015 15:26:02 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id tBREQ2tS045485; Sun, 27 Dec 2015 15:26:02 +0100 (CET) (envelope-from pho) Date: Sun, 27 Dec 2015 15:26:02 +0100 From: Peter Holm To: Konstantin Belousov Cc: Shawn Webb , freebsd-current@freebsd.org Subject: Re: isofs kernel panic Message-ID: <20151227142602.GA44178@x2.osted.lan> References: <20151227083848.GA43841@mutt-hardenedbsd> <20151227100927.GK3625@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151227100927.GK3625@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 27 Dec 2015 14:26:12 -0000 On Sun, Dec 27, 2015 at 12:09:27PM +0200, Konstantin Belousov wrote: > On Sun, Dec 27, 2015 at 03:38:48AM -0500, Shawn Webb wrote: > > Hey All, > > > > This is from booting a new installer ISO, generated today from a very > > recent commit: > > > > === Begin Log === > > Trying to mount root from cd9660:/dev/iso9660/11_0__HBSD_AMD64_CD [ro]... > > lock order reversal: > > 1st 0xfffffe00f6222e40 bufwait (bufwait) @ /jenkins/workspace/HardenedBSD-master-amd64/sys/vm/vm_pager.c:380 > > 2nd 0xfffff800063785f0 isofs (isofs) @ /jenkins/workspace/HardenedBSD-master-amd64/sys/kern/imgact_elf.c:883 > > stack backtrace: > > #0 0xffffffff80a7ce70 at witness_debugger+0x70 > > #1 0xffffffff80a7cd71 at witness_checkorder+0xe71 > > #2 0xffffffff80a0033b at __lockmgr_args+0xd3b > > #3 0xffffffff80ac2fdc at vop_stdlock+0x3c > > #4 0xffffffff80fc0fc0 at VOP_LOCK1_APV+0x100 > > #5 0xffffffff80ae397a at _vn_lock+0x9a > > #6 0xffffffff809c4b01 at exec_elf64_imgact+0xa91 > > #7 0xffffffff809e35e9 at kern_execve+0x4b9 > > #8 0xffffffff809e2ddc at sys_execve+0x4c > > #9 0xffffffff809c760a at start_init+0x26a > > #10 0xffffffff809eadb4 at fork_exit+0x84 > > #11 0xffffffff80e4e9ae at fork_trampoline+0xe > > userret: returning with the following locks held: > > exclusive lockmgr bufwait (bufwait) r = 0 (0xfffffe00f6222c10) locked @ /jenkins/workspace/HardenedBSD-master-amd64/sys/vm/vm_pager.c:380 > > exclusive lockmgr bufwait (bufwait) r = 0 (0xfffffe00f6222e40) locked @ /jenkins/workspace/HardenedBSD-master-amd64/sys/vm/vm_pager.c:380 > > panic: witness_warn > > === End Log === > > > > This is 11-CURRENT/amd64, based on HardenedBSD commit > > f0a4c61a2e9e2433db632d70d5764e79c5b84b7a. I booted the ISO up in bhyve > > using vmrun.sh. I haven't ruled out anything on HardenedBSD's side, yet, > > but we don't have any changes that would cause a panic'ing LOR in > > vm_pager.c. I'll do some more investigative work when I get some more > > sleep. But if anyone has any ideas, please let me know. I kinda wonder > > if this is related to the recent VFS changes by FreeBSD. > > The following change would fix your problem, I did not tested it. > > diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c > index ff30f4d..66dd29d 100644 > --- a/sys/vm/vnode_pager.c > +++ b/sys/vm/vnode_pager.c > @@ -806,6 +806,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, > * than a page size, then use special small filesystem code. > */ > if (pagesperblock == 0) { > + relpbuf(bp, freecnt); > for (i = 0; i < count; i++) { > PCPU_INC(cnt.v_vnodein); > PCPU_INC(cnt.v_vnodepgsin); > _______________________________________________ This works for me, when running programs from a isofs file system. -- Peter