Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2013 08:24:47 +0300
From:      Daniel Braniss <danny@cs.huji.ac.il>
To:        John Baldwin <jhb@freebsd.org>
Cc:        pyunyh@gmail.com, freebsd-stable@freebsd.org
Subject:   Re: SunFire X2200 ilo's bge1 DOWN/UP
Message-ID:  <E1UiHpX-000AaB-38@kabab.cs.huji.ac.il>
In-Reply-To: <201305300859.20928.jhb@freebsd.org>
References:  <E1UgsL2-000DBa-El@kabab.cs.huji.ac.il>  <20130529085544.GC3042@michelle.cdnetworks.com> <E1UhwbD-000Ea3-SL@kabab.cs.huji.ac.il> <201305300859.20928.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <sys/proc.h>
> 	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 ...

thanks,
	danny





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1UiHpX-000AaB-38>