Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2022 22:30:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 268400] Page fault kernel panic with KTLS enabled
Message-ID:  <bug-268400-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268400

            Bug ID: 268400
           Summary: Page fault kernel panic with KTLS enabled
           Product: Base System
           Version: 13.1-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: amigan@gmail.com

I enabled KTLS in nginx today on this machine, which is a reverse proxy and=
 pf
firewall. I am using base openssl.

FreeBSD 13.1-STABLE #14 stable/13-n253193-e84ae60fc510: Wed Nov 30 11:00:39=
 EST
2022     root@argon.h.c907:/usr/obj/usr/src/amd64.amd64/sys/FARWARL amd64

A few hours later it panicked:
Fatal trap 12: page fault while in kernel mode
cpuid =3D 1; apic id =3D 02
fault virtual address   =3D 0x0
fault code              =3D supervisor read data, page not present
instruction pointer     =3D 0x20:0xffffffff80b81ea0
stack pointer           =3D 0x28:0xfffffe0083ed7440
frame pointer           =3D 0x28:0xfffffe0083ed7470
code segment            =3D base 0x0, limit 0xfffff, type 0x1b
                        =3D DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        =3D interrupt enabled, resume, IOPL =3D 0
current process         =3D 2 (thr_2)
trap number             =3D 12
panic: page fault
cpuid =3D 1
time =3D 1671140551
KDB: stack backtrace:
#0 0xffffffff8094b025 at kdb_backtrace+0x65
#1 0xffffffff808fdf01 at vpanic+0x151
#2 0xffffffff808fdda3 at panic+0x43
#3 0xffffffff80dc4d87 at trap_fatal+0x387
#4 0xffffffff80dc4ddf at trap_pfault+0x4f
#5 0xffffffff80d9c648 at calltrap+0x8
#6 0xffffffff80b78c2c at icmp6_reflect+0x2ac
#7 0xffffffff80b7875c at icmp6_error+0x37c
#8 0xffffffff80be4d61 at pf_route6+0x651
#9 0xffffffff80be4086 at pf_test6+0xa36
#10 0xffffffff80bf7ab0 at pf_check6_out+0x40
#11 0xffffffff80a4f527 at pfil_run_hooks+0x97
#12 0xffffffff80b947f9 at ip6_output+0x1149
#13 0xffffffff80b5b930 at tcp_output+0x1ea0
#14 0xffffffff80b6ddfb at tcp_usr_ready+0x15b
#15 0xffffffff8098f6a7 at ktls_encrypt+0x2a7
#16 0xffffffff8098e8e8 at ktls_work_thread+0x188
#17 0xffffffff808badae at fork_exit+0x7e
Timeout initializing vt_vga
Uptime: 13d6h0m24s
Dumping 1240 out of 8062 MB: (CTRL-C to abort)
..2%..11%..21%..31%..42%..51%..61%..71%..82%..91%

(kgdb) bt
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  dump_savectx () at /usr/src/sys/kern/kern_shutdown.c:394
#2  0xffffffff808fdaf8 in dumpsys (di=3D0x0) at
/usr/src/sys/x86/include/dump.h:87
#3  doadump (textdump=3D<optimized out>) at /usr/src/sys/kern/kern_shutdown=
.c:423
#4  kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:497
#5  0xffffffff808fdf6e in vpanic (fmt=3D<optimized out>,
ap=3Dap@entry=3D0xfffffe0083ed7290) at /usr/src/sys/kern/kern_shutdown.c:930
#6  0xffffffff808fdda3 in panic (fmt=3D<unavailable>) at
/usr/src/sys/kern/kern_shutdown.c:854
#7  0xffffffff80dc4d87 in trap_fatal (frame=3D0xfffffe0083ed7380, eva=3D0) =
at
/usr/src/sys/amd64/amd64/trap.c:942
#8  0xffffffff80dc4ddf in trap_pfault (frame=3D0xfffffe0083ed7380,
usermode=3Dfalse, signo=3D<optimized out>, ucode=3D<optimized out>) at
/usr/src/sys/amd64/amd64/trap.c:761
#9  <signal handler called>
#10 in6_cksum_partial (m=3D<optimized out>, m@entry=3D0xfffff8003985f900,
nxt=3Dnxt@entry=3D58 ':', off=3D<optimized out>, off@entry=3D40, len=3Dlen@=
entry=3D1240,
cov=3D<optimized out>, cov@entry=3D1240)
    at /usr/src/sys/netinet6/in6_cksum.c:319
#11 0xffffffff80b820cd in in6_cksum (m=3D0x488, m@entry=3D0xfffff8003985f90=
0, nxt=3D0
'\000', nxt@entry=3D58 ':', off=3D8, off@entry=3D40, len=3D893953, len@entr=
y=3D1240)
    at /usr/src/sys/netinet6/in6_cksum.c:366
#12 0xffffffff80b78c2c in icmp6_reflect (m=3Dm@entry=3D0xfffff8003985f900,
off=3Doff@entry=3D40) at /usr/src/sys/netinet6/icmp6.c:2159
#13 0xffffffff80b7875c in icmp6_error (m=3D0xfffff8003985f900, type=3Dtype@=
entry=3D2,
code=3Dcode@entry=3D0, param=3D1280) at /usr/src/sys/netinet6/icmp6.c:384
#14 0xffffffff80be4d61 in pf_route6 (m=3Dm@entry=3D0xfffffe0083ed7a20,
r=3D0xfffff8005814a800, dir=3Ddir@entry=3D2, oifp=3D<optimized out>,
s=3D0xfffff800a3bfb000, pd=3Dpd@entry=3D0xfffffe0083ed7698,
    inp=3D0xfffff801b47313e0) at /usr/src/sys/netpfil/pf/pf.c:6188
#15 0xffffffff80be4086 in pf_test6 (dir=3Ddir@entry=3D2, pflags=3D131072,
ifp=3D0xfffff80003bb0800, m0=3Dm0@entry=3D0xfffffe0083ed7a20, inp=3D0xfffff=
801b47313e0)
at /usr/src/sys/netpfil/pf/pf.c:7181
#16 0xffffffff80bf7ab0 in pf_check6_out (m=3D0xfffffe0083ed7a20, ifp=3D0x48=
8,
flags=3D0, ruleset=3D<optimized out>, inp=3D0x200) at
/usr/src/sys/netpfil/pf/pf_ioctl.c:5617
#17 0xffffffff80a4f527 in pfil_run_hooks (head=3D<optimized out>, p=3D...,
ifp=3D0xfffff80003bb0800, flags=3Dflags@entry=3D131072, inp=3D0xfffff801b47=
313e0) at
/usr/src/sys/net/pfil.c:187
#18 0xffffffff80b947f9 in ip6_output (m0=3Dm0@entry=3D0xfffff80034029600, o=
pt=3D0x0,
ro=3D0xfffff801b4731570, flags=3D0, im6o=3Dim6o@entry=3D0x0, ifpp=3Difpp@en=
try=3D0x0,
inp=3D0xfffff801b47313e0)
    at /usr/src/sys/netinet6/ip6_output.c:1014
#19 0xffffffff80b5b930 in tcp_output (tp=3D0xfffffe00c82f90e0) at
/usr/src/sys/netinet/tcp_output.c:1501
#20 0xffffffff80b6ddfb in tcp_usr_ready (so=3D<optimized out>,
m=3D0xfffff800186c5d00, count=3D<optimized out>) at
/usr/src/sys/netinet/tcp_usrreq.c:1302
#21 0xffffffff8098f6a7 in ktls_encrypt (top=3D0x0, top@entry=3D0xfffff80018=
6c5d00)
at /usr/src/sys/kern/uipc_ktls.c:2332
#22 0xffffffff8098e8e8 in ktls_work_thread (ctx=3Dctx@entry=3D0xfffff800031=
ab700)
at /usr/src/sys/kern/uipc_ktls.c:2380
#23 0xffffffff808badae in fork_exit (callout=3D0xffffffff8098e760
<ktls_work_thread>, arg=3D0xfffff800031ab700, frame=3D0xfffffe0083ed7f40) at
/usr/src/sys/kern/kern_fork.c:1093
#24 <signal handler called>
#25 mi_startup () at /usr/src/sys/kern/init_main.c:322
#26 0xffffffff80d14399 in swapper () at /usr/src/sys/vm/vm_swapout.c:755
#27 0xffffffff80340022 in btext () at /usr/src/sys/amd64/amd64/locore.S:80


I will keep the core around for a bit; please feel free to let me know of
anymore information required.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268400-227>