From owner-freebsd-fs@freebsd.org Sat Sep 30 08:18:50 2017 Return-Path: Delivered-To: freebsd-fs@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 EFC19E157C5 for ; Sat, 30 Sep 2017 08:18:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 99628661C4 for ; Sat, 30 Sep 2017 08:18:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v8U8IaRW046583 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 30 Sep 2017 11:18:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v8U8IaRW046583 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v8U8IZ48046582; Sat, 30 Sep 2017 11:18:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Sep 2017 11:18:35 +0300 From: Konstantin Belousov To: Anton Yuzhaninov Cc: freebsd-fs@freebsd.org Subject: Re: Panic: vm_fault: fault on nofault entry Message-ID: <20170930081835.GH95911@kib.kiev.ua> References: <35aef1ac-a1dd-4526-46f8-599b4fb3b0f4@citrin.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35aef1ac-a1dd-4526-46f8-599b4fb3b0f4@citrin.ru> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2017 08:18:51 -0000 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
> > 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"