From owner-freebsd-stable@FreeBSD.ORG Mon Jun 3 06:25:48 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A85237F4; Mon, 3 Jun 2013 06:25:48 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 589D6197F; Mon, 3 Jun 2013 06:25:47 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1UjOCz-0006oU-DS; Mon, 03 Jun 2013 09:25:33 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: pyunyh@gmail.com Subject: Re: SunFire X2200 ilo's bge1 DOWN/UP In-reply-to: <20130531054713.GB1478@michelle.cdnetworks.com> References: <20130529085544.GC3042@michelle.cdnetworks.com> <201305300859.20928.jhb@freebsd.org> <20130531054713.GB1478@michelle.cdnetworks.com> Comments: In-reply-to YongHyeon PYUN message dated "Fri, 31 May 2013 14:47:13 +0900." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 03 Jun 2013 09:25:33 +0300 From: Daniel Braniss Message-ID: Cc: freebsd-stable@freebsd.org, John Baldwin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2013 06:25:48 -0000 > On Fri, May 31, 2013 at 08:24:47AM +0300, Daniel Braniss wrote: > > > On Thursday, May 30, 2013 2:44:35 am Daniel Braniss wrote: > > > > > --/04w6evG8XlLl3ft > > > > > Content-Type: text/x-diff; charset=us-ascii > > > > > Content-Disposition: attachment; filename="bge.media_sts.diff" > > > > > > > > > > Index: sys/dev/bge/if_bge.c > > > > > =================================================================== > > > > > --- sys/dev/bge/if_bge.c (revision 251021) > > > > > +++ sys/dev/bge/if_bge.c (working copy) > > > > > @@ -5583,6 +5583,10 @@ bge_ifmedia_sts(struct ifnet *ifp, struct ifmediar > > > > > > > > > > BGE_LOCK(sc); > > > > > > > > > > + if ((ifp->if_flags & IFF_UP) == 0) { > > > > > + BGE_UNLOCK(sc); > > > > > + return; > > > > > + } > > > > > if (sc->bge_flags & BGE_FLAG_TBI) { > > > > > ifmr->ifm_status = IFM_AVALID; > > > > > ifmr->ifm_active = IFM_ETHER; > > > > > > > > > > --/04w6evG8XlLl3ft-- > > > > after 18hs, the logs are empty! > > > > it seems the patch fixes the problem. > > > > > > > > now maybe it's time to hunt for who is randomly calling for bge_ifmedia_sts > > > > ... > > > > > > It could be any number of daemons that query interface state such as an > > > SNMP server, ladvd, etc. > > > > > > If you wanted help you could modify the patch so that it does something like > > > this: > > > > > #include > > > if (/* test for IFF_UP */) { > > > BGE_UNLOCK(sc); > > > if_printf(ifp, "state queried on down interface by pid %d (%s)", > > ------------------------------------------------------------------------------| > > add a \n > > > curthread->td_proc->p_pid, curthread->td_proc->p_comm); > > > return; > > > } > > > > > > -- > > > John Baldwin > > snmpd call this several times a second, (difficult to measeure since sysolog > > just says > > last message repeated 22 times > > in any case, the DOWN/UP appears once every few hours, oh well. > > I have now stopped the snmpd daemon, maybe there is someone else ... > > I have no idea why snmpd wants to know media status for interfaces > that are put into down state. The media status resolved after > bringing up the interface may be different one that was seen > before. > The patch also makes dhclient think driver got a valid link > regardless of link establishment. I guess that wouldn't be > issue though. I'll commit the patch after some more testing. > > Thanks for reporting and testing! > no problem! after more than 3 days, there were no more 'reports', so snmpd was the culprit. the snmpd we use is from ports, i'll try and see waht's going on ... thanks danny > > > > thanks, > > danny > > > >