From owner-freebsd-bugs@freebsd.org Thu May 6 18:31:39 2021 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1EF262A5B6 for ; Thu, 6 May 2021 18:31:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FbhxR5Q0Yz4wvD for ; Thu, 6 May 2021 18:31:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id B9C2162A4F4; Thu, 6 May 2021 18:31:39 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B98F862A4F3 for ; Thu, 6 May 2021 18:31:39 +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 4FbhxR4qmkz4wq1 for ; Thu, 6 May 2021 18:31:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 98F151D290 for ; Thu, 6 May 2021 18:31:39 +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 146IVdBs095497 for ; Thu, 6 May 2021 18:31:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 146IVdtO095496 for bugs@FreeBSD.org; Thu, 6 May 2021 18:31:39 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 255665] Fatal trap 12 while "route delete" in ROUTE_MPATH variant - FreeBSD 14.0-CURRENT (GENERIC) Date: Thu, 06 May 2021 18:31:39 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: michael.adm@gmail.com 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 MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 18:31:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255665 Bug ID: 255665 Summary: Fatal trap 12 while "route delete" in ROUTE_MPATH variant - FreeBSD 14.0-CURRENT (GENERIC) Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: michael.adm@gmail.com FreeBSD 14.0-CURRENT (GENERIC) All parameters are default. In /boot/loader.conf -> if_wg_load=3D"YES" In /etc/rc.conf -> wireguard_interfaces=3D"wg0 wg1 wg2 wg3" In wg0.conf ... wg3.conf (almost everything is identical) : [Interface] Address =3D 10.127.0.9/30 PrivateKey =3D xxxx...xxxx=3D ListenPort =3D 46010 Table =3D off [Peer] PublicKey =3D yyyy...yyyy=3D AllowedIPs =3D 10.18.0.0/22, 10.127.0.8/30, 172.16.42.0/24 Endpoint =3D A.B.C.D:46010 PersistentKeepalive =3D 25 #> ifconfig wg0: flags=3D80c1 metric 0 mtu 1420 options=3D80000 inet 10.127.0.9 netmask 0xfffffffc groups: wg nd6 options=3D109 wg1: flags=3D80c1 metric 0 mtu 1420 options=3D80000 inet 10.127.0.13 netmask 0xfffffffc groups: wg nd6 options=3D109 wg2: flags=3D80c1 metric 0 mtu 1420 options=3D80000 inet 10.127.0.17 netmask 0xfffffffc groups: wg nd6 options=3D109 wg3: flags=3D80c1 metric 0 mtu 1420 options=3D80000 inet 10.127.0.21 netmask 0xfffffffc groups: wg nd6 options=3D109 #> netstat -rn4 Routing tables Internet: Destination Gateway Flags Netif Expire default E.F.G.H UGS hn1 10.127.0.8/30 link#7 U wg0 10.127.0.9 link#7 UHS lo0 10.127.0.12/30 link#8 U wg1 10.127.0.13 link#8 UHS lo0 10.127.0.16/30 link#9 U wg2 10.127.0.17 link#9 UHS lo0 10.127.0.20/30 link#10 U wg3 10.127.0.21 link#10 UHS lo0 A.F.S.112 link#5 UH hn1 A.F.S.254 link#5 UHS hn1 127.0.0.1 link#1 UH lo0 172.16.42.0/24 link#4 U hn0 172.16.42.2 link#4 UHS lo0 Let's try to delete a non-existing route: #> route delete 10.18.0.0/22 10.127.0.10 route: route has not been found delete net 10.18.0.0: gateway 10.127.0.10 fib 0: not in table At this stage, everything is ok. Adding routes: route add 10.18.0.0/22 10.127.0.10 route add 10.18.0.0/22 10.127.0.14 route add 10.18.0.0/22 10.127.0.18 route add 10.18.0.0/22 10.127.0.22 #> netstat -rn4 Routing tables Internet: Destination Gateway Flags Netif Expire default E.F.G.H UGS hn1 10.18.0.0/22 10.127.0.14 UGS wg1 10.18.0.0/22 10.127.0.10 UGS wg0 10.18.0.0/22 10.127.0.22 UGS wg3 10.18.0.0/22 10.127.0.18 UGS wg2 10.127.0.8/30 link#7 U wg0 10.127.0.9 link#7 UHS lo0 10.127.0.12/30 link#8 U wg1 10.127.0.13 link#8 UHS lo0 10.127.0.16/30 link#9 U wg2 10.127.0.17 link#9 UHS lo0 10.127.0.20/30 link#10 U wg3 10.127.0.21 link#10 UHS lo0 A.F.S.112 link#5 UH hn1 A.F.S.254 link#5 UHS hn1 127.0.0.1 link#1 UH lo0 172.16.42.0/24 link#4 U hn0 172.16.42.2 link#4 UHS lo0 In /var/log/messages -> the message appears: kernel: FIB: enabled flowid calculation for locally-originated packets Let's try to delete a existing one route: #> route delete 10.18.0.0/22 10.127.0.10 delete net 10.18.0.0: gateway 10.127.0.10 fib 0 Let's try to delete a non-existing route (let's say we made a mistake in the figure): #> route delete 10.18.0.0/22 10.127.0.50 kernel: Fatal trap 12: page fault while in kernel mode kernel: cpuid =3D 1; apic id =3D 01 kernel: fault virtual address =3D 0x18 kernel: fault code =3D supervisor read data, page not present kernel: instruction pointer =3D 0x20:0xffffffff80d779f4 kernel: stack pointer =3D 0x28:0xfffffe00b54f14f0 kernel: frame pointer =3D 0x28:0xfffffe00b54f14f0 kernel: code segment =3D base rx0, limit 0xfffff, type 0x1b kernel: =3D DPL 0, pres 1, long 1, def32 0, gran 1 kernel: processor eflags =3D interrupt enabled, resume, IOPL =3D 0 kernel: current process =3D 1648 (route) kernel: trap number =3D 12 kernel: panic: page fault kernel: cpuid =3D 1 kernel: time =3D 1620308885 kernel: KDB: stack backtrace: kernel: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00b54f11a0 kernel: vpanic() at vpanic+0x181/frame 0xfffffe00b54f11f0 kernel: panic() at panic+0x43/frame 0xfffffe00b54f1250 kernel: trap_fatal() at trap_fatal+0x387/frame 0xfffffe00b54f12b0 kernel: trap_pfault() at trap_pfault+0x4f/frame 0xfffffe00b54f1310 kernel: trap() at trap+0x27d/frame 0xfffffe00b54f1420 kernel: calltrap() at calltrap+0x8/frame 0xfffffe00b54f1420 kernel: --- trap 0xc, rip =3D 0xffffffff80d779f4, rsp =3D 0xfffffe00b54f14f= 0, rbp =3D 0xfffffe00b54f14f0 --- kernel: rt_get_inet_prefix_pmask() at rt_get_inet_prefix_pmask+0x4/frame 0xfffffe00b54f14f0 kernel: route_output() at route_output+0x17da/frame 0xfffffe00b54f17d0 kernel: sosend_generic() at sosend_generic+0x633/frame 0xfffffe00b54f1890 kernel: sosend() at sosend+0x50/frame 0xfffffe00b54f18c0 kernel: soo_write() at soo_write+0x49/frame 0xfffffe00b54f1900 kernel: dofilewrite() at dofilewrite+0x88/frame 0xfffffe00b54f1950 kernel: sys_write() at sys_write+0xbc/frame 0xfffffe00b54f19c0 kernel: amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe00b54f1af0 kernel: fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00b54f1af0 kernel: --- syscall (4, FreeBSD ELF64, sys_write), rip =3D 0x8011ad8ea, rsp= =3D 0x7fffffffe918, rbp =3D 0x7fffffffe9d0 --- kernel: KDB: enter: panic --=20 You are receiving this mail because: You are the assignee for the bug.=