Date: Fri, 9 Jun 2006 06:18:57 GMT From: Kouji Ito <kouji@cty-net.ne.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/98738: [PATCH] if_bge.c Fail to collect link-status of bge interface. Message-ID: <200606090618.k596IvWO031632@www.freebsd.org> Resent-Message-ID: <200606090620.k596KHus005806@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98738 >Category: kern >Synopsis: [PATCH] if_bge.c Fail to collect link-status of bge interface. >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 09 06:20:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Kouji Ito >Release: 7.0-CURRENT (2006-06-07 JST), 5.5-RELEASE >Organization: Japan >Environment: 7.0-CURRENT (2006-06-07 JST) 5.5-RELEASE (option SMP) Probably 6.1-RELEASE are the same, too. >Description: When plural processes collect link status at the same time, fail. When Creating Clusters of FreeBSD computers,then problem is effected. "LinkStatus" of NIC is well used by Clusters System Control. >How-To-Repeat: (Condition 1) Use the kernel which added "option SMP". (Condition 2) Use the SMP Machine.(or Intel Pentium4 with HTT) (Condition 3) plural processes collect link status at the same time. TEST1 Run this script in parallel. #!/bin/csh while 1 set aaa=`ifconfig bge0 | grep active | wc -l` if ($aaa == 1) then echo "bge0 Link OK" else echo "bge0 Link NG" exit endif end Wait a few minutes. Can see "bge Link NG" message. >Fix: Use this patch or Use non-SMP kernel. I hope this patch is commited, Thank you very much. __FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.131 2006/06/08 10:19:16 glebius Exp $") *** if_bge.c.orig Fri Jun 9 14:34:29 2006 --- if_bge.c Fri Jun 9 14:34:58 2006 *************** *** 3325,3330 **** --- 3325,3331 ---- break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: + BGE_LOCK(sc); if (sc->bge_tbi) { error = ifmedia_ioctl(ifp, ifr, &sc->bge_ifmedia, command); *************** *** 3333,3338 **** --- 3334,3340 ---- error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); } + BGE_UNLOCK(sc); break; case SIOCSIFCAP: mask = ifr->ifr_reqcap ^ ifp->if_capenable; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606090618.k596IvWO031632>