Bug 256278 - [panic] main-n247019-aa462cab60c page fault while in kernel mode
Summary: [panic] main-n247019-aa462cab60c page fault while in kernel mode
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: panic
Depends on:
Reported: 2021-05-31 02:43 UTC by Masachika ISHIZUKA
Modified: 2021-06-02 16:35 UTC (History)
1 user (show)

See Also:

core.txt.0 (222.00 KB, text/plain)
2021-05-31 02:43 UTC, Masachika ISHIZUKA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masachika ISHIZUKA 2021-05-31 02:43:36 UTC
Created attachment 225392 [details]

It occured when I wanted to play an mp4 file with mpv.
I can play most files with mpv, but some files make core dump.
I can play all files with mpv on 14.0-CURRENT main-n246500-d1cb8d11b0c.

% cat /var/crash/info.last 
Dump header from device: /dev/gpt/fbswap
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 504762368
  Blocksize: 512
  Compression: none
  Dumptime: 2021-05-31 01:28:29 +0900
  Hostname: carrot.ish.org
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 14.0-CURRENT #38 main-n247019-aa462cab60c-dirty: Sat May 29 18:26:04 JST 2021
  Panic String: page fault
  Dump Parity: 781310293
  Bounds: 0
  Dump Status: good

vmcore was stored to https://www.ish.org/files/vmcore.0-d1cb8d11b0c.xz
Comment 1 Mark Johnston freebsd_committer 2021-06-02 16:15:19 UTC
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0xb0
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff830e36f9
stack pointer	        = 0x28:0xfffffe00cd8687e0
frame pointer	        = 0x28:0xfffffe00cd8687e0
code segment		= base rx0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 1563 (mpv/vo)
trap number		= 12
Dumping 481 out of 8060 MB:..4%..14%..24%..34%..44%..54%..64%..74%..84%..94%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
55	/usr/src/sys/amd64/include/pcpu_aux.h: No such file or directory.
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff830f07e1 in vt_kms_postswitch () from /boot/modules/drm.ko
#3  0xffffffff80a6f362 in vt_window_switch (vw=0xfffff80004fd5f40, 
    vw@entry=0xffffffff81ae8eb8 <vt_conswindow>)
    at /usr/src/sys/dev/vt/vt_core.c:615
#4  0xffffffff80a6c77f in vtterm_cngrab (tm=<unavailable>, 
    tm@entry=<error reading variable: value is not available>)
    at /usr/src/sys/dev/vt/vt_core.c:1827
#5  0xffffffff80bacef6 in cngrab () at /usr/src/sys/kern/kern_cons.c:381
#6  0xffffffff80c176ec in vpanic (fmt=0xffffffff811dcb79 "%s", 
    ap=ap@entry=0xfffffe00cd868520) at /usr/src/sys/kern/kern_shutdown.c:891
#7  0xffffffff80c17543 in panic (fmt=<unavailable>)
    at /usr/src/sys/kern/kern_shutdown.c:843
#8  0xffffffff810d2de7 in trap_fatal (frame=0xfffffe00cd868720, eva=176)
    at /usr/src/sys/amd64/amd64/trap.c:915
#9  0xffffffff810d2e87 in trap_pfault (frame=frame@entry=0xfffffe00cd868720, 
    usermode=false, signo=<optimized out>, signo@entry=0x0, 
    ucode=<optimized out>, ucode@entry=0x0)
    at /usr/src/sys/amd64/amd64/trap.c:732
#10 0xffffffff810d247b in trap (frame=0xfffffe00cd868720)
    at /usr/src/sys/amd64/amd64/trap.c:398
#11 <signal handler called>
#12 0xffffffff830e36f9 in drm_prime_handle_to_fd_ioctl ()
   from /boot/modules/drm.ko
#13 0xffffffff830d6d72 in drm_ioctl_kernel () from /boot/modules/drm.ko
#14 0xffffffff830d70d8 in drm_ioctl () from /boot/modules/drm.ko
#15 0xffffffff80e76c13 in linux_file_ioctl_sub (fp=<optimized out>, 
    filp=0xffffffff830e36d0 <drm_prime_handle_to_fd_ioctl>, 
    fop=<optimized out>, cmd=<optimized out>, data=<optimized out>, 
    td=<optimized out>)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:977
#16 linux_file_ioctl (fp=<optimized out>, cmd=<optimized out>, 
    data=<optimized out>, cred=<optimized out>, td=0xfffff800368d4e00)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:1600
#17 0xffffffff80c8d2b9 in fo_ioctl (fp=<optimized out>, com=3222037549, 
    data=0x1, active_cred=0x0, td=0xfffffe00cd667e40)
    at /usr/src/sys/sys/file.h:356
#18 kern_ioctl (td=<optimized out>, td@entry=0xfffffe00cd667e40, 
    fd=<optimized out>, com=<optimized out>, com@entry=3222037549, 
    data=0x1 <error: Cannot access memory at address 0x1>, 
    data@entry=0xfffffe00cd868a10 "\t") at /usr/src/sys/kern/sys_generic.c:803
#19 0xffffffff80c8cf7a in sys_ioctl (td=0xfffffe00cd667e40, 
    uap=0xfffffe00cd668228) at /usr/src/sys/kern/sys_generic.c:711
#20 0xffffffff810d37ae in syscallenter (td=<optimized out>)
    at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:189
#21 amd64_syscall (td=0xfffffe00cd667e40, traced=0)
    at /usr/src/sys/amd64/amd64/trap.c:1156
#22 <signal handler called>
#23 0x000000080297c96a in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdebf3818
Comment 2 Mark Johnston freebsd_committer 2021-06-02 16:15:48 UTC
The panic is happening in the DRM module.  Which drm port are you using?
Comment 3 Masachika ISHIZUKA 2021-06-02 16:30:28 UTC
(In reply to Mark Johnston from comment #2)

Sorry. I was missing to update drm-current-kmod.
After 'pkg install -f drm-current-kmod', this panic is not occured.

I'm too sorry to disturb you.
Comment 4 Mark Johnston freebsd_committer 2021-06-02 16:35:29 UTC
(In reply to Masachika ISHIZUKA from comment #3)
Ok, please re-open if it occurs again.