[Bug 271101] cxgbe(4): panic due to lock recursion while creating tracing interface
Date: Thu, 27 Apr 2023 17:06:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271101 --- Comment #2 from Navdeep Parhar <np@FreeBSD.org> --- I tried to see if making the driver sx recursive would fix the problem but ran into a different assertion in if_clone.c diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index 00c403b59bba..25316eec77f8 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -233,7 +233,7 @@ void t4_tracer_modload(void) { - sx_init(&t4_trace_lock, "T4/T5 tracer lock"); + sx_init_flags(&t4_trace_lock, "T4/T5 tracer lock", SX_RECURSE); t4_cloner = if_clone_advanced(t4_cloner_name, 0, t4_cloner_match, t4_cloner_create, t4_cloner_destroy); } (kgdb) p panicstr $1 = 0xffffffff8219e380 <vpanic[buf]> "Assertion ifd->ifp != NULL failed at /root/ws/dev/sys/net/if_clone.c:415" (kgdb) bt #0 0xffffffff80fdb06b in doadump (textdump=1) at /root/ws/dev/sys/kern/kern_shutdown.c:407 #1 0xffffffff80fdaca9 in kern_reboot (howto=260) at /root/ws/dev/sys/kern/kern_shutdown.c:528 #2 0xffffffff80fdb7c9 in vpanic (fmt=0xffffffff819ba49d "Assertion %s failed at %s:%d", ap=0xfffffe0088fc8970) at /root/ws/dev/sys/kern/kern_shutdown.c:972 #3 0xffffffff80fdb00e in panic (fmt=0xffffffff819ba49d "Assertion %s failed at %s:%d") at /root/ws/dev/sys/kern/kern_shutdown.c:896 #4 0xffffffff811a96e0 in if_clone_createif_nl (ifc=0xfffff80001c72300, ifname=0xfffffe0088fc8d98 "t6nex0", ifd=0xfffffe0088fc8a10) at /root/ws/dev/sys/net/if_clone.c:415 #5 0xffffffff811a949f in ifc_create_ifp (name=0xfffffe0088fc8d98 "t6nex0", ifd=0xfffffe0088fc8aa0, ifpp=0xfffffe0088fc8a98) at /root/ws/dev/sys/net/if_clone.c:215 #6 0xffffffff811a9803 in if_clone_create (name=0xfffffe0088fc8d98 "t6nex0", len=16, params=0x0) at /root/ws/dev/sys/net/if_clone.c:243 #7 0xffffffff811a235e in ifioctl (so=0xfffff80009186780, cmd=3223349628, data=0xfffffe0088fc8d98 "t6nex0", td=0xfffff80009db9740) at /root/ws/dev/sys/net/if.c:3048 #8 0xffffffff810a0f53 in soo_ioctl (fp=0xfffff80001f512d0, cmd=3223349628, data=0xfffffe0088fc8d98, active_cred=0xfffff8000198e100, td=0xfffff80009db9740) at /root/ws/dev/sys/kern/sys_socket.c:267 #9 0xffffffff8109234e in fo_ioctl (fp=0xfffff80001f512d0, com=3223349628, data=0xfffffe0088fc8d98, active_cred=0xfffff8000198e100, td=0xfffff80009db9740) at /root/ws/dev/sys/sys/file.h:367 #10 0xffffffff81092124 in kern_ioctl (td=0xfffff80009db9740, fd=3, com=3223349628, data=0xfffffe0088fc8d98 "t6nex0") at /root/ws/dev/sys/kern/sys_generic.c:807 #11 0xffffffff81091d81 in sys_ioctl (td=0xfffff80009db9740, uap=0xfffff80009db9b38) at /root/ws/dev/sys/kern/sys_generic.c:715 #12 0xffffffff817a68f9 in syscallenter (td=0xfffff80009db9740) at /root/ws/dev/sys/amd64/amd64/../../kern/subr_syscall.c:190 #13 0xffffffff817a603b in amd64_syscall (td=0xfffff80009db9740, traced=0) at /root/ws/dev/sys/amd64/amd64/trap.c:1199 #14 <signal handler called> #15 0x00001b45efb6750a in ?? () Backtrace stopped: Cannot access memory at address 0x1b45eba4f018 (kgdb) -- You are receiving this mail because: You are the assignee for the bug.