Date: Mon, 01 Nov 2021 10:13:04 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 259458] iflib_rxeof NULL pointer crash with vmxnet3 driver Message-ID: <bug-259458-7501-goyeAbSKOg@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-259458-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-259458-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259458 --- Comment #14 from Andriy Gapon <avg@FreeBSD.org> --- 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 <cnputs_mtx+24> "= ") 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<optimized out>, signo=3D<optimized out>, ucode=3D<optimized out= >) 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 <signal handler called> #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<error reading variable: Cannot access memory at ad= dress 0x1>) at /usr/src/sys/x86/include/bus_dma.h:125 #20 iflib_fl_refill (ctx=3D0xfffff80002dd7000, fl=3D<optimized out>, count=3D<optimized out>) 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<optimized out>, budget=3D<optimized out>) at /usr/src/sys/net/iflib.c:2899 #23 _task_fn_rx (context=3D<optimized out>) 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<optimized out>) at /usr/src/sys/kern/subr_gtaskqueue.c:537 #26 0xffffffff8070792d in fork_exit (callout=3D0xffffffff80780610 <gtaskqueue_thread_loop>, 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<optimized out>, count=3D<optimized out>) 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 <optimized out> i =3D 29 credits =3D 1949 bus_addr =3D 18446735283517988864 cl =3D <optimized out> err =3D <optimized out> m =3D <optimized out> (kgdb) p $1.ifl_size $4 =3D 2048 (kgdb) p/x *$1.ifl_rx_bitmap@32 $7 =3D {0xffffffffffffffff <repeats 32 times>} (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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259458-7501-goyeAbSKOg>