kern/98738: [PATCH] if_bge.c Fail to collect link-status of bge interface.

Kouji Ito kouji at cty-net.ne.jp
Fri Jun 9 06:20:18 UTC 2006


>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:


More information about the freebsd-bugs mailing list