From nobody Mon Nov 01 10:13:04 2021 X-Original-To: net@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 C652418383C0 for ; Mon, 1 Nov 2021 10:13:04 +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 4HjTPX57Pfz4Wwx for ; Mon, 1 Nov 2021 10:13:04 +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 90DAF7A83 for ; Mon, 1 Nov 2021 10:13:04 +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 1A1AD4vX075995 for ; Mon, 1 Nov 2021 10:13:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1A1AD4O8075994 for net@FreeBSD.org; Mon, 1 Nov 2021 10:13:04 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: net@FreeBSD.org Subject: [Bug 259458] iflib_rxeof NULL pointer crash with vmxnet3 driver Date: Mon, 01 Nov 2021 10:13:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259458 --- Comment #14 from Andriy Gapon --- Some data from the latest crash I've got. Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x15fc12000 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff80a5dd07 stack pointer =3D 0x28:0xfffffe00c85cb930 frame pointer =3D 0x28:0xfffffe00c85cb960 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 0 (if_io_tqg_0) trap number =3D 12 panic: page fault cpuid =3D 0 time =3D 1635553138 KDB: stack backtrace: stack1 db_trace_self_wrapper+0x2b vpanic+0x182 panic+0x43 trap_fatal+0x391 trap_pfault+0x4f trap+0x286 calltrap+0x8 stack2 bounce_bus_dmamap_sync+0x17 iflib_fl_refill+0x31b _task_fn_rx+0x84b gtaskqueue_run_locked+0xed gtaskqueue_thread_loop+0x7e fork_exit+0x6d fork_trampoline+0xe (kgdb) bt [snip] #13 0xffffffff8073dc23 in panic (fmt=3D0xffffffff81178120 "= ") at /usr/src/sys/kern/kern_shutdown.c:909 #14 0xffffffff809d8b31 in trap_fatal (frame=3D0xfffffe00c85cb870, eva=3D590= 1459456) at /usr/src/sys/amd64/amd64/trap.c:921 #15 0xffffffff809d8b8f in trap_pfault (frame=3D0xfffffe00c85cb870, usermode=3D, signo=3D, ucode=3D) at /usr/src/sys/amd64/amd64/trap.c:739 #16 0xffffffff809d8256 in trap (frame=3D0xfffffe00c85cb870) at /usr/src/sys/amd64/amd64/trap.c:405 #17 #18 0xffffffff80a5dd07 in bounce_bus_dmamap_sync (dmat=3D0xfffff80002d83400, map=3D0x15fc12000, op=3D1) at /usr/src/sys/x86/x86/busdma_bounce.c:973 #19 0xffffffff8085104b in bus_dmamap_sync (dmat=3D0xfffff80002d83400, map=3D0x15fc12000, op=3D) at /usr/src/sys/x86/include/bus_dma.h:125 #20 iflib_fl_refill (ctx=3D0xfffff80002dd7000, fl=3D, count=3D) at /usr/src/sys/net/iflib.c:2109 #21 0xffffffff8084d5db in iflib_fl_refill_all (ctx=3D0xfffff80002dd7000, fl=3D0xfffff80002d955c0) at /usr/src/sys/net/iflib.c:2188 #22 iflib_rxeof (rxq=3D, budget=3D) at /usr/src/sys/net/iflib.c:2899 #23 _task_fn_rx (context=3D) at /usr/src/sys/net/iflib.c:3868 #24 0xffffffff807808bd in gtaskqueue_run_locked (queue=3D0xfffff800020c7200= ) at /usr/src/sys/kern/subr_gtaskqueue.c:362 #25 0xffffffff8078068e in gtaskqueue_thread_loop (arg=3D) at /usr/src/sys/kern/subr_gtaskqueue.c:537 #26 0xffffffff8070792d in fork_exit (callout=3D0xffffffff80780610 , arg=3D0xfffffe00007f8008, frame=3D0xfffffe00c85cb= c00) at /usr/src/sys/kern/kern_fork.c:1088 (kgdb) fr 21 #21 0xffffffff8084d5db in iflib_fl_refill_all (ctx=3D0xfffff80002dd7000, fl=3D0xfffff80002d955c0) at /usr/src/sys/net/iflib.c:2188 2188 in /usr/src/sys/net/iflib.c (kgdb) p fl $1 =3D (iflib_fl_t) 0xfffff80002d955c0 (kgdb) fr 20 #20 iflib_fl_refill (ctx=3D0xfffff80002dd7000, fl=3D, count=3D) at /usr/src/sys/net/iflib.c:2109 2109 /usr/src/sys/net/iflib.c: No such file or directory. (kgdb) i loc iru =3D {iru_paddrs =3D 0xfffff80002d95640, iru_idxs =3D 0xfffff80002d95740= , iru_pidx =3D 1888, iru_qsidx =3D 0, iru_count =3D 32, iru_buf_size =3D 4096, iru_fli= dx =3D 1 '\001'} cb_arg =3D {error =3D 0, seg =3D {ds_addr =3D 5901459456, ds_len =3D 4096},= nseg =3D 1} sd_m =3D 0xfffffe00eabdc000 sd_map =3D 0xfffffe00eabe8000 sd_cl =3D 0xfffffe00eabe0000 sd_ba =3D 0xfffffe00eabe4000 idx =3D 1949 pidx =3D 1920 frag_idx =3D -1 n =3D i =3D 29 credits =3D 1949 bus_addr =3D 18446735283517988864 cl =3D err =3D m =3D (kgdb) p $1.ifl_size $4 =3D 2048 (kgdb) p/x *$1.ifl_rx_bitmap@32 $7 =3D {0xffffffffffffffff } (kgdb) p *$1 $8 =3D {ifl_cidx =3D 0, ifl_pidx =3D 1920, ifl_credits =3D 1920, ifl_gen = =3D 0 '\000', ifl_rxd_size =3D 0 '\000', ifl_rx_bitmap =3D 0xfffff80002d83200, ifl_fragid= x =3D 128, ifl_size =3D 2048, ifl_buf_size =3D 4096, ifl_cltype =3D 3,=20 ifl_zone =3D 0xfffff800029c5000, ifl_sds =3D {ifsd_map =3D 0xfffffe00eabe= 8000, ifsd_m =3D 0xfffffe00eabdc000, ifsd_cl =3D 0xfffffe00eabe0000, ifsd_ba =3D 0xfffffe00eabe4000}, ifl_rxq =3D 0xfffffe00ea9f5000, ifl_id =3D 1 '\001',=20 ifl_buf_tag =3D 0xfffff80002d83400, ifl_ifdi =3D 0xfffff80002d9b4d0, ifl_bus_addrs =3D {5901619200, 5901623296, 5901533184, 5901537280, 59015413= 76, 5901545472, 5901549568, 5901553664, 5901557760, 5901561856, 5901565952, 5901570048,=20 5901574144, 5901488128, 5901492224, 5901496320, 5901500416, 5901504512, 5901508608, 5901512704, 5901516800, 5901520896, 5901524992, 5901529088, 5901443072, 5901447168, 5901451264, 5901455360, 5901459456, 5901602816,=20 5901606912, 5901611008}, ifl_rxd_idxs =3D {1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 193= 7, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 2047, 1917,=20 1918, 1919}} Things of note: - frag_idx =3D -1 and ifl_rx_bitmap is indeed full - i =3D 29 and there is a jump from 1947 to 2047 (maximum index as ifl_size= =3D 2048) in ifl_rxd_idxs at positions 27 and 28 This makes me suspect that a concurrent refill topped the free list while t= he refill in question was running. --=20 You are receiving this mail because: You are the assignee for the bug.=