[Bug 264842] kernel core generated due to VM page fault

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 23 Jun 2022 10:49:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264842

            Bug ID: 264842
           Summary: kernel core generated due to VM page fault
           Product: Base System
           Version: Unspecified
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: aadhya@cisco.com

We have observed core generated several times due to page fault.

Environment :
===================
hw.model: Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz
hw.machine: amd64
hw.ncpu: 24
FreeBSD 11.2-RELEASE

Here is the BT :
==================
(kgdb) bt
#0  0xffffffff806110e7 in doadump ()
#1  0xffffffff80610f5b in kern_reboot ()
#2  0xffffffff80611459 in vpanic ()
#3  0xffffffff80611193 in panic ()
#4  0xffffffff808967df in trap_fatal ()
#5  0xffffffff80896839 in trap_pfault ()
#6  0xffffffff80896028 in trap ()
#7  0xffffffff8087535e in calltrap ()
#8  0xffffffff8085c9b1 in vm_page_alloc_after ()
#9  0xffffffff8085f450 in vm_page_grab_pages ()
#10 0xffffffff806aa6aa in allocbuf ()
#11 0xffffffff806a8a99 in getblk ()
#12 0xffffffff80801b4f in ffs_balloc_ufs2 ()
#13 0xffffffff8082b39b in ffs_write ()
#14 0xffffffff80950dc3 in VOP_WRITE_APV ()
#15 0xffffffff806da6e4 in vn_write ()
#16 0xffffffff806da223 in vn_io_fault_doio ()
#17 0xffffffff806d82a1 in vn_io_fault1 ()
#18 0xffffffff806d6518 in vn_io_fault ()
#19 0xffffffff8066b330 in dofilewrite ()
#20 0xffffffff8066af48 in kern_writev ()
#21 0xffffffff8066aed6 in sys_write ()
#22 0xfffffe103e0271e0 in ?? ()
#23 0xffffffff00000001 in ?? ()
#24 0x0000000000130000 in ?? ()
#25 0x0000000000010000 in ?? ()
#26 0x0000000100000000 in ?? ()
#27 0xfffff80012f3d620 in ?? ()
#28 0x00000008139dc000 in ?? ()
#29 0x0000000000010000 in ?? ()
#30 0xfffffe103e027330 in ?? ()
#31 0xffffffff80896f3c in amd64_syscall ()
(kgdb) 

=================================================

After adding symbol file the bt gives the following details :

(kgdb) bt
#0  doadump (textdump=1) at pcpu.h:229
#1  0xffffffff80610f5b in kern_reboot (howto=260) at
../../../kern/kern_shutdown.c:395
#2  0xffffffff80611459 in vpanic (fmt=<value optimized out>, ap=<value
optimized out>)
    at ../../../kern/kern_shutdown.c:799
#3  0xffffffff80611193 in panic (fmt=<value optimized out>) at
../../../kern/kern_shutdown.c:719
#4  0xffffffff808967df in trap_fatal (frame=0xfffffe103e026890, eva=90) at
../../../amd64/amd64/trap.c:875
#5  0xffffffff80896839 in trap_pfault (frame=0xfffffe103e026890, usermode=0) at
pcpu.h:229
#6  0xffffffff80896028 in trap (frame=0xfffffe103e026890) at
../../../amd64/amd64/trap.c:415
#7  0xffffffff8087535e in calltrap () at ../../../amd64/amd64/exception.S:196
#8  0xffffffff8085c9b1 in vm_page_alloc_after (object=0xfffff80297ab42d0,
pindex=307, req=<value optimized out>,
    mpred=0xfffff8103310e3d8) at atomic.h:219
#9  0xffffffff8085f450 in vm_page_grab_pages (object=<value optimized out>,
pindex=304,
    allocflags=<value optimized out>, ma=0xfffffe0f81090bc0, count=<value
optimized out>) at ../../../vm/vm_page.c:3397
#10 0xffffffff806aa6aa in allocbuf (bp=0xfffffe0f81090ac0, size=<value
optimized out>) at ../../../kern/vfs_bio.c:2759
#11 0xffffffff806a8a99 in getblk (vp=<value optimized out>, blkno=<value
optimized out>, size=<value optimized out>,
    slpflag=<value optimized out>, slptimeo=<value optimized out>, flags=8) at
../../../kern/vfs_bio.c:3769
#12 0xffffffff80801b4f in ffs_balloc_ufs2 (vp=0xfffff8041e470760,
startoffset=<value optimized out>,
    size=<value optimized out>, cred=0xfffff80020140700, flags=<value optimized
out>, bpp=0xfffffe103e026d28)
    at ../../../ufs/ffs/ffs_balloc.c:1001
#13 0xffffffff8082b39b in ffs_write (ap=0xfffffe103e026e88) at
../../../ufs/ffs/ffs_vnops.c:749
#14 0xffffffff80950dc3 in VOP_WRITE_APV (vop=<value optimized out>,
a=0xfffffe103e026e88) at vnode_if.c:1000
#15 0xffffffff806da6e4 in vn_write (fp=<value optimized out>, uio=<value
optimized out>, active_cred=0x130000,
    flags=<value optimized out>, td=<value optimized out>) at vnode_if.h:413
#16 0xffffffff806da223 in vn_io_fault_doio (args=0xfffffe103e0270a0,
uio=0xfffffe103e0271b0, td=0xfffff80012f3d620)
    at ../../../kern/vfs_vnops.c:965
#17 0xffffffff806d82a1 in vn_io_fault1 () at ../../../kern/vfs_vnops.c:1083
#18 0xffffffff806d6518 in vn_io_fault (fp=<value optimized out>,
uio=0xfffff8041e4708e8,
    active_cred=0xfffff80020250078, flags=<value optimized out>, td=<value
optimized out>)
    at ../../../kern/vfs_vnops.c:1187
#19 0xffffffff8066b330 in dofilewrite (td=0xfffff80012f3d620, fd=91,
fp=0xfffff802151c5b40, auio=0xfffffe103e0271b0,
    offset=<value optimized out>, flags=0) at file.h:307
#20 0xffffffff8066af48 in kern_writev (td=0xfffff80012f3d620, fd=91,
auio=0xfffffe103e0271b0)
---Type <return> to continue, or q <return> to quit---
    at ../../../kern/sys_generic.c:506
#21 0xffffffff8066aed6 in sys_write (td=<value optimized out>, uap=<value
optimized out>)
    at ../../../kern/sys_generic.c:420
#22 0xffffffff80896f3c in amd64_syscall (td=0xfffff80012f3d620, traced=0) at
subr_syscall.c:132
#23 0xffffffff80875bad in fast_syscall_common () at
../../../amd64/amd64/exception.S:475
#24 0x0000000801ef5e8a in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb)

================================================

What could be the possible fix for this crash ?
Thanks !!!

-- 
You are receiving this mail because:
You are the assignee for the bug.