From nobody Mon Oct 9 13:55:17 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S40sf3Jnzz4wc6l for ; Mon, 9 Oct 2023 13:55:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S40sd63ggz3DS6 for ; Mon, 9 Oct 2023 13:55:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696859717; a=rsa-sha256; cv=none; b=mO82+W9f6f5fUZdD4IqHAXsLXd39adH69t0REfQFT+mFQiPpKKn+1YdaF34u2apz0oJdqf Ywh39K46T+xkaynEtyiJYUhZCBFoC3AI+l/LfzTCDPOOiyC3vbmhznsNGUYN5e0HjdPZPt NAmGES8Tjl4gUv5u6L9DCI3nLvCBQhumTAh7j1GeiaI1MLz3sRM0OW0Tw0E5f4+H7fzYYX c2IaEISCpUSBUs08YWKVPqutUNrgB3FBGf8+LC0bQb8da/01BObsV2WX2FgQep6+szYTGs 2PKng+BDzOeubYwsH0ezrj0J2ht00Wuj0EoseeDPKwh1HzgmwPaVFnAY+xqR+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696859717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pPp9biOC1wc5Q4RcaqxNh4A3bL/e3iQKB6Jx32t+NWE=; b=MDTurE3gFuL1iyoPVpkquBGPLqHKzri7CfMmRTEYIo4PD1gJv2lrzgOsw6ioCsm2Zord22 IYk8HsgCLpsX9wxmHNiYXNpNJ5YI+N8R0p3PXsxBHpN4AyTuNc5A+eS7O1CfPqOhgjm58Y VHYPWo0TNF3PtknxEcTR3KrgUWkyivu540zbA1n40RqSl98YR7nOSAO2f0zBPVZAaqTnaZ 4gbpeX/29mothz5cN7Er92dM1A7tmA/TQn8a5kHwHcRBF2JH25OvIhAdz/SRV6XrILhsRn YVmFknWNIk8oe7wNqkxIZmp+ZigbtBxPcNA3y+4IgE5Rf4v+hx+5aoL97zu5Zg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S40sd57YYzy19 for ; Mon, 9 Oct 2023 13:55:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 399DtHle061747 for ; Mon, 9 Oct 2023 13:55:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 399DtHT3061746 for bugs@FreeBSD.org; Mon, 9 Oct 2023 13:55:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274375] page fault while load kernel module virtio Date: Mon, 09 Oct 2023 13:55:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274375 Bug ID: 274375 Summary: page fault while load kernel module virtio Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: zlei@FreeBSD.org This is initially observed while checking sysctl knobs (loader tunables) in modules. I managed to narrow it down. Tested with current/15 and 14.0-BETA5 on amd64 machine. Steps to repeat: ``` # kldload sdt # kldload virtio.ko ``` The kernel backtrace: ``` dumped core - see /var/crash/vmcore.3 Sun Oct 8 10:25:33 CST 2023 FreeBSD 14.0-BETA5 FreeBSD 14.0-BETA5 #1 releng/14.0-n265192-d67558ef3149:= Sat Oct 7 18:03:25 CST 2023=20=20=20=20 zlei@:/usr/obj/home/zlei/freebsd-src-releng-14.0/amd64.amd64/sys/GENERIC a= md64 panic: page fault GNU gdb (GDB) 13.2 [GDB v13.2 for FreeBSD] Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd14.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /boot/kernel/kernel... Reading symbols from /usr/lib/debug//boot/kernel.beta5/kernel.debug... interface virtio.1 already present in the KLD 'kernel'! 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:0xffffffff8321b134 stack pointer =3D 0x28:0xfffffe00b04e7920 frame pointer =3D 0x28:0xfffffe00b04e7950 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 97755 (kldload) rdi: fffff80178d6a6a0 rsi: fffffe00b04e7928 rdx: 0000000000000000 rcx: ffffffff88ff5470 r8: 0000000000000004 r9: 00000000000000f3 rax: 0000000000000000 rbx: fffffe00b04e7974 rbp: fffffe00b04e7950 r10: 0000000000000002 r11: ffffffffffffff90 r12: fffff80178bfd780 r13: fffffe00b04e7974 r14: fffff80178bfd7c0 r15: ffffffff88ff5468 trap number =3D 12 panic: page fault cpuid =3D 1 time =3D 1696731847 KDB: stack backtrace: #0 0xffffffff80b9017d at kdb_backtrace+0x5d #1 0xffffffff80b43282 at vpanic+0x132 #2 0xffffffff80b43143 at panic+0x43 #3 0xffffffff8100b81c at trap_fatal+0x40c #4 0xffffffff8100b86f at trap_pfault+0x4f #5 0xffffffff80fe2848 at calltrap+0x8 #6 0xffffffff80b0f61c at linker_file_unload+0xcc #7 0xffffffff810be9c8 at link_elf_load_file+0x198 #8 0xffffffff80b0ee93 at linker_load_module+0x9e3 #9 0xffffffff80b10b9a at kern_kldload+0x16a #10 0xffffffff80b10cbc at sys_kldload+0x5c #11 0xffffffff8100c0d9 at amd64_syscall+0x109 #12 0xffffffff80fe315b at fast_syscall_common+0xf8 Uptime: 16m43s Dumping 727 out of 8100 MB:..3%..11%..22%..31%..42%..51%..62%..71%..82%..91% __curthread () at /home/zlei/freebsd-src-releng-14.0/sys/amd64/include/pcpu_aux.h:57 57 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (offsetof(stru= ct pcpu, (kgdb) #0 __curthread () at /home/zlei/freebsd-src-releng-14.0/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=3D) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_shutdown.c:405 #2 0xffffffff80b42e17 in kern_reboot (howto=3D260) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_shutdown.c:526 #3 0xffffffff80b432ef in vpanic (fmt=3D0xffffffff81135a78 "%s",=20 ap=3Dap@entry=3D0xfffffe00b04e7770) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_shutdown.c:970 #4 0xffffffff80b43143 in panic (fmt=3D) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_shutdown.c:894 #5 0xffffffff8100b81c in trap_fatal (frame=3D0xfffffe00b04e7860, eva=3D0) at /home/zlei/freebsd-src-releng-14.0/sys/amd64/amd64/trap.c:952 #6 0xffffffff8100b86f in trap_pfault (frame=3D0xfffffe00b04e7860,=20 usermode=3Dfalse, signo=3D, ucode=3D) at /home/zlei/freebsd-src-releng-14.0/sys/amd64/amd64/trap.c:760 #7 #8 0xffffffff8321b134 in sdt_kld_unload_try () from /boot/kernel/sdt.ko #9 0xffffffff80b0f61c in linker_file_unload (file=3D0xfffffe00b04e7974,=20 file@entry=3D0xfffff8015497b480, flags=3Dflags@entry=3D1) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_linker.c:673 #10 0xffffffff810be9c8 in link_elf_load_file (cls=3D,=20 filename=3D, result=3D) at /home/zlei/freebsd-src-releng-14.0/sys/kern/link_elf_obj.c:1241 #11 0xffffffff80b0ee93 in LINKER_LOAD_FILE ( cls=3D0xffffffff817550a8 , result=3D0xfffffe00b04e7c00,= =20 filename=3D) at ./linker_if.h:214 #12 linker_load_file (filename=3D, result=3D) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_linker.c:459 #13 linker_load_module (kldname=3Dkldname@entry=3D0xfffff80154965800 "virti= o.ko",=20 modname=3Dmodname@entry=3D0x0, parent=3Dparent@entry=3D0x0,=20 verinfo=3Dverinfo@entry=3D0x0, lfpp=3Dlfpp@entry=3D0xfffffe00b04e7d90) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_linker.c:2203 #14 0xffffffff80b10b9a in kern_kldload (td=3Dtd@entry=3D0xfffffe00b0d3a3a0,= =20 file=3Dfile@entry=3D0xfffff80154965800 "virtio.ko",=20 fileid=3Dfileid@entry=3D0xfffffe00b04e7de4) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_linker.c:1162 #15 0xffffffff80b10cbc in sys_kldload (td=3D0xfffffe00b0d3a3a0,=20 uap=3D) at /home/zlei/freebsd-src-releng-14.0/sys/kern/kern_linker.c:1185 #16 0xffffffff8100c0d9 in syscallenter (td=3D0xfffffe00b0d3a3a0) at /home/zlei/freebsd-src-releng-14.0/sys/amd64/amd64/../../kern/subr_syscall.= c:187 #17 amd64_syscall (td=3D0xfffffe00b0d3a3a0, traced=3D0) at /home/zlei/freebsd-src-releng-14.0/sys/amd64/amd64/trap.c:1197 #18 #19 0x000013e93dad93fa in ?? () Backtrace stopped: Cannot access memory at address 0x13e93c3e81c8 (kgdb)=20 ``` Note: `kldload virtio.ko` can trigger the panic but `kldload virtio` will n= ot. --=20 You are receiving this mail because: You are the assignee for the bug.=