Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2017 11:18:35 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Anton Yuzhaninov <citrin@citrin.ru>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Panic: vm_fault: fault on nofault entry
Message-ID:  <20170930081835.GH95911@kib.kiev.ua>
In-Reply-To: <35aef1ac-a1dd-4526-46f8-599b4fb3b0f4@citrin.ru>
References:  <35aef1ac-a1dd-4526-46f8-599b4fb3b0f4@citrin.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 29, 2017 at 02:22:43PM -0400, Anton Yuzhaninov wrote:
> Hi All,
> 
> I have panics when I try to use nginx on my notebook. When sendfile is
> enabled it is easy to trigger panic, after disabling sendfile I've got
> no panics so far and I think that panic is triggered by using sendfile.
> 
> Root filesystem - UFS on GELI whith 8k sectorsize.
> 
> GELI with sectorsize large than page size is non-standard configuration,
> and I've got problem because of this in the past:
> https://lists.freebsd.org/pipermail/freebsd-fs/2016-October/023957.html
> 
> but it was fixed in:
> https://svnweb.freebsd.org/changeset/base/307626
Well, it was fixed by replacing the code path for normal page in by
the less buggy pager. The sendfile path was not touched, it still uses
the generic pager with all its bugs sitting in place.

There is no way around it, you cannot use block size > page size for
sendfile, and there are more issues, e.g. with the simultaneous file
truncation.

> 
> Probably I've not used sendfile on this filesystem since then.
> 
> Panic string is:
> "vm_fault: fault on nofault entry, addr: fffffe0220ab6000"
> 
> 0xfffffe0220ab6000 is the address for bzero in
> vnode_pager_generic_getpages_done
> 
> (kgdb) f 17
> #17 0xffffffff807ee290 in vnode_pager_generic_getpages_done
> (bp=0xfffffe01ea816490) at /spool/src/sys/vm/vnode_pager.c:1049
> 1049			bzero(bp->b_data + bp->b_bcount,
> (kgdb) l
> 1044			if (!buf_mapped(bp)) {
> 1045				bp->b_data = bp->b_kvabase;
> 1046				pmap_qenter((vm_offset_t)bp->b_data, bp->b_pages,
> 1047				    bp->b_npages);
> 1048			}
> 1049			bzero(bp->b_data + bp->b_bcount,
> 1050			    PAGE_SIZE * bp->b_npages - bp->b_bcount);
> 1051		}
> 1052		if (buf_mapped(bp)) {
> 1053			pmap_qremove((vm_offset_t)bp->b_data, bp->b_npages);
> (kgdb) p bp->b_data + bp->b_bcount
> $4 = 0xfffffe0220ab6000 <Address 0xfffffe0220ab6000 out of bounds>
> 
> bp->b_data is a pointer to data from a file served using sendfile.
> and bp->b_bcount is 8192 (GELI sector size is also 8192)
> 
> Full backtrace: http://termbin.com/dqpl
> OS version: 11.1-STABLE #0 r322995
> 
> -- 
> Best Regards,
> Anton Yuzhaninov
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170930081835.GH95911>