[Bug 262894] Kernel Panic (page fault) with 13.1-BETA2 in g_eli & httpd

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 20 Apr 2022 18:47:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262894

--- Comment #33 from Alexander Motin <mav@FreeBSD.org> ---
We've managed to get full dump:

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0xfffff80e00000004
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80f1cdcd
stack pointer           = 0x28:0xfffffe0148413c00
frame pointer           = 0x28:0xfffffe0148413ca0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 3655 (g_eli[3] gptid/e420)
trap number             = 12
panic: page fault
cpuid = 3
time = 1650468037
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01484139c0
vpanic() at vpanic+0x17f/frame 0xfffffe0148413a10
panic() at panic+0x43/frame 0xfffffe0148413a70
trap_fatal() at trap_fatal+0x385/frame 0xfffffe0148413ad0
trap_pfault() at trap_pfault+0x4f/frame 0xfffffe0148413b30
calltrap() at calltrap+0x8/frame 0xfffffe0148413b30
--- trap 0xc, rip = 0xffffffff80f1cdcd, rsp = 0xfffffe0148413c00, rbp =
0xfffffe0148413ca0 ---
aesni_crypt_xts() at aesni_crypt_xts+0x17d/frame 0xfffffe0148413ca0
aesni_decrypt_xts() at aesni_decrypt_xts+0xe/frame 0xfffffe0148413cc0
aesni_cipher_crypt() at aesni_cipher_crypt+0x2f1/frame 0xfffffe0148413d70
aesni_process() at aesni_process+0x159/frame 0xfffffe0148413dc0
crypto_dispatch() at crypto_dispatch+0x118/frame 0xfffffe0148413df0
g_eli_crypto_run() at g_eli_crypto_run+0x178/frame 0xfffffe0148413e90
g_eli_worker() at g_eli_worker+0x328/frame 0xfffffe0148413ef0
fork_exit() at fork_exit+0x7e/frame 0xfffffe0148413f30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0148413f30
--- trap 0x80af60b4, rip = 0, rsp = 0, rbp = 0 ---

(kgdb) bt
#0  __curthread () at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=textdump@entry=1) at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/kern/kern_shutdown.c:399
#2  0xffffffff80b164c1 in kern_reboot (howto=260) at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/kern/kern_shutdown.c:487
#3  0xffffffff80b1693e in vpanic (fmt=0xffffffff811b9599 "%s", ap=<optimized
out>)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/kern/kern_shutdown.c:920
#4  0xffffffff80b16743 in panic (fmt=<unavailable>)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/kern/kern_shutdown.c:844
#5  0xffffffff81042855 in trap_fatal (frame=0xfffffe0148413b40,
eva=18446735337746071556)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/amd64/amd64/trap.c:944
#6  0xffffffff810428af in trap_pfault (frame=0xfffffe0148413b40,
usermode=false, signo=<optimized out>, ucode=<optimized out>)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/amd64/amd64/trap.c:763
#7  <signal handler called>
#8  aesni_crypt_xts_block8 (key_schedule=<optimized out>, from=<optimized out>,
to=<optimized out>, rounds=<optimized out>, 
    tweak=<optimized out>, do_encrypt=<optimized out>)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni_wrap.c:358
#9  aesni_crypt_xts (rounds=<optimized out>, data_schedule=0xfffff8000ed94140,
tweak_schedule=<optimized out>, len=<optimized out>, 
    from=<optimized out>, from@entry=0xfffff80e00000004 <error: Cannot access
memory at address 0xfffff80e00000004>, 
    to=<optimized out>, to@entry=0xfffff80e00000004 <error: Cannot access
memory at address 0xfffff80e00000004>, 
    iv=0xfffffe0148413d30 "", do_encrypt=0) at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni_wrap.c:411
#10 0xffffffff80f1d3ee in aesni_decrypt_xts (rounds=12,
data_schedule=0xfffff8000ed94140, tweak_schedule=0xfffff8000ed94160, len=32, 
    from=from@entry=0xfffff80e00000004 <error: Cannot access memory at address
0xfffff80e00000004>, 
    to=to@entry=0xfffff80e00000004 <error: Cannot access memory at address
0xfffff80e00000004>, iv=0xfffffe0148413d30 "")
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni_wrap.c:442
#11 0xffffffff80f16ce1 in aesni_cipher_crypt (ses=0xfffff8000ed94048,
crp=crp@entry=0xfffff801e7e1fe38, csp=<optimized out>, 
    csp@entry=0xfffff8000ed94008) at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni.c:788
#12 0xffffffff80f166e9 in aesni_cipher_process (ses=<optimized out>,
crp=0xfffff801e7e1fe38)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni.c:687
#13 aesni_process (dev=<optimized out>, crp=0xfffff801e7e1fe38, hint=<optimized
out>)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/crypto/aesni/aesni.c:379
#14 0xffffffff80e3b078 in crypto_dispatch (crp=crp@entry=0xfffff801e7e1fe38)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/opencrypto/crypto.c:1498
#15 0xffffffff80a3f678 in g_eli_crypto_run (wr=wr@entry=0xfffff803e1bb4440,
bp=bp@entry=0xfffff806c34978d0)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/geom/eli/g_eli_privacy.c:343
#16 0xffffffff80a38378 in g_eli_worker (arg=arg@entry=0xfffff803e1bb4440)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/geom/eli/g_eli.c:708
#17 0xffffffff80ad223e in fork_exit (callout=0xffffffff80a38050 <g_eli_worker>,
arg=0xfffff803e1bb4440, frame=0xfffffe0148413f40)
    at
/data/workspace/TrueNAS_13.0_Nightlies/freenas/_BE/os/sys/kern/kern_fork.c:1093
#18 <signal handler called>

I haven't touched crypto code for a while, so going to look into what's
interesting there slowly.

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