From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 9 06:20:18 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79EA316A41F for ; Fri, 9 Jun 2006 06:20:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE2E043D70 for ; Fri, 9 Jun 2006 06:20:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k596KHQQ005807 for ; Fri, 9 Jun 2006 06:20:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k596KHus005806; Fri, 9 Jun 2006 06:20:17 GMT (envelope-from gnats) Resent-Date: Fri, 9 Jun 2006 06:20:17 GMT Resent-Message-Id: <200606090620.k596KHus005806@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kouji Ito Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FE7816A473 for ; Fri, 9 Jun 2006 06:18:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCCCD43D78 for ; Fri, 9 Jun 2006 06:18:57 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k596Iv5M031633 for ; Fri, 9 Jun 2006 06:18:57 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k596IvWO031632; Fri, 9 Jun 2006 06:18:57 GMT (envelope-from nobody) Message-Id: <200606090618.k596IvWO031632@www.freebsd.org> Date: Fri, 9 Jun 2006 06:18:57 GMT From: Kouji Ito To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/98738: [PATCH] if_bge.c Fail to collect link-status of bge interface. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 06:20:18 -0000 >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: