if_bridge panic, other minor issues...

Chris Csanady cc at 137.org
Thu Dec 22 03:01:30 PST 2005


I am getting a panic with the new bridging code when I add an
interface to a bridge with stp enabled.  The trace is at the end of
the message, though this seems to fix it.
--- bridgestp.c.orig	2005-12-22 02:26:30.000000000 -0600
+++ bridgestp.c	2005-12-22 02:28:13.000000000 -0600
@@ -1035,7 +1035,10 @@
	int error = 0;
	bzero((char *)&ifmr, sizeof(ifmr));
+
+	lwkt_serialize_enter(ifp->if_serializer);
	error = (*ifp->if_ioctl)(ifp, SIOCGIFMEDIA, (caddr_t)&ifmr,  
curthread->td_proc->p_ucred);
+	lwkt_serialize_exit(ifp->if_serializer);
	if ((error == 0) && (ifp->if_flags & IFF_UP)) {
	 	if (ifmr.ifm_status & IFM_ACTIVE) {

Also, it looks like the examples in brconfig.8 could use updating.
Though I am uncertain if this is the preferred method, the following
appears to work:
/etc/rc.conf:
ifconfig_fxp1="up"
ifconfig_fxp2="up"
ifconfig_fxp3="up"
cloned_interfaces="bridge0"
ifconfig_bridge0="DHCP"
/etc/start_if.bridge0:
brconfig bridge0 \
  add fxp1 stp fxp1 \
  add fxp2 stp fxp2 \
  add fxp3 stp fxp3 \
  up
While unrelated, if the network is unavailable at boot, dntpd will  
simply
print the usage and exit.

Finally, I am wondering if the APIC interrupt routing code is
considered to be broken.  At least on my machine, it remaps the 16-19
irqs back on top of the lower irqs.  As such, all of my network cards
have their interrupts shared.  I am almost certain that these mapped
correctly in the past, though searching the archives, I don't see any
evidence that it ever worked.
It is really a shame how much effort must be wasted dealing with all
this legacy junk on x86 machines.  As if it wasn't already convoluted
enough, they had to heap on the the poorly designed APIC.
In any case, many thanks for getting the new bridging code included
with this release.
Chris

# brconfig bridge0 add fxp1 stp fxp1
panic: assertion: (ifp->if_serializer)->last_td == curthread in  
ifmedia_ioctl
mp_lock = 00000000; cpuid = 0; lapic.id = 00000000
Trace beginning at frame 0xc8a898d8
panic(c03b5260,0,c03d7e70,c8a89908,c8a89970) at panic+0x17f
panic(c03d7e70,c03a1778,c4e3c100,ff800000,c8a89944) at panic+0x17f
ifmedia_ioctl(c4df28c8,c8a89970,c0cb1570,c0286938,0) at ifmedia_ioctl 
+0x63
fxp_ioctl(c4df28c8,c0286938,c8a89970,c8abb000,0) at fxp_ioctl+0x10d
bstp_ifupdstatus(c4df3f48,c4e49c38,c02324eb,c4df3f48,c8a89a04) at  
bstp_ifupdstatus+0x51
bstp_initialization(c4df3f48,c8a89a04,0,c8a89b48,c8a89a30) at  
bstp_initialization+0x1fd
bridge_ioctl_sifflags(c4df3f48,c8a89a04,18,c4e3c100,c4df3f48) at  
bridge_ioctl_sifflags+0x53
bridge_ioctl(c4df3f48,801c697b,c8a89b48,c8abb000,c8a89a64) at  
bridge_ioctl+0x12e
in_control(c7f02e60,801c697b,c8a89b48,c4df3f48,c4e3c100) at in_control 
+0x9b3
so_pru_control(c7f02e60,801c697b,c8a89b48,c4df3f48,c4e3c100) at  
so_pru_control+0x31
ifioctl(c7f02e60,801c697b,c8a89b48,c4e3c100,c0380a3e) at ifioctl+0xac9
soo_ioctl(c0cd3b80,801c697b,c8a89b48,c4e3c100,c0451790) at soo_ioctl 
+0x1bf
mapped_ioctl(3,801c697b,bfbffa20,0,c8a89d40) at mapped_ioctl+0x4c4
ioctl(c8a89c24,c8a89d10,c,3,1) at ioctl+0x33
syscall2(2f,2f,2f,bfbffa3c,bfbffa90) at syscall2+0x317
Xint0x80_syscall() at Xint0x80_syscall+0x2a
Debugger("panic")

CPU0 stopping CPUs: 0x00000002
stopped
Stopped at      Debugger+0x44:  movb    $0,in_Debugger.0
db>






More information about the Kernel mailing list