Panic: vm_fault: fault on nofault entry

Konstantin Belousov kostikbel at gmail.com
Sat Sep 30 08:18:51 UTC 2017


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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list