[comp.protocols.tcp-ip] 4.3bsd imp going down crash?

stanonik@NPRDC.ARPA (Ron Stanonik) (11/01/88)

Our vax 11/780 running 4.3bsd with an lhdh crashed shortly
after "imp going down" and "imp marked down" messages.  The
error was a seg fault and as I read (or misread) the crash
dump, the "marked down" message cleared the per imp hosttable
(sc->imp_hosts) while impstart was trying to read it (actually
impstart had handed the value to impstarthost, which is where
we croaked).

Does this sound familiar; ie, have we missed some bug fix?
We are running the networking fixes that berkeley announced
a while ago; eg, if_imp.c is version 7.5 6/8/88.

Thanks,

Ron Stanonik
stanonik@nprdc.arpa

torek@OKEEFFE.BERKELEY.EDU (Chris Torek) (11/02/88)

Most likely you ran into the bug fixed below.  This (and others) are
fixed in the 4.3BSD-tahoe networking code, and probably in the upgrade
for 4.3BSD that is (was?) on ucbarpa.

Chris

*** if_imphost.c.7.3	Tue Nov  1 13:10:09 1988
--- if_imphost.c.7.4	Tue Nov  1 13:10:18 1988
***************
*** 10,14 ****
   * is provided ``as is'' without express or implied warranty.
   *
!  *	@(#)if_imphost.c	7.3 (Berkeley) 2/8/88
   */
  
--- 10,14 ----
   * is provided ``as is'' without express or implied warranty.
   *
!  *	@(#)if_imphost.c	7.4 (Berkeley) 2/8/88
   */
  
***************
*** 201,204 ****
--- 201,205 ----
  	register struct mbuf *m;
  	register struct host *hp, *lp;
+ 	struct imp_softc *sc;
  	struct hmbuf *hm;
  	int s = splimp(), unit, any;
***************
*** 206,210 ****
  	for (unit = 0; unit < NIMP; unit++) {
  	    any = 0;
! 	    for (m = imp_softc[unit].imp_hosts; m; m = m->m_next) {
  		hm = mtod(m, struct hmbuf *);
  		hp = hm->hm_hosts; 
--- 207,212 ----
  	for (unit = 0; unit < NIMP; unit++) {
  	    any = 0;
! 	    sc = &imp_softc[unit];
! 	    for (m = sc->imp_hosts; m; m = m->m_next) {
  		hm = mtod(m, struct hmbuf *);
  		hp = hm->hm_hosts; 
***************
*** 221,224 ****
--- 223,228 ----
  				any = 1;
  				hostrelease(hp);
+ 				if (sc->imp_hostq == m)
+ 					sc->imp_hostq = 0;
  			}
  		    }
***************
*** 225,230 ****
  		}
  	    }
! 	    if (any)
  		hostcompress(unit);
  	}
  	splx(s);
--- 229,235 ----
  		}
  	    }
! 	    if (any) {
  		hostcompress(unit);
+ 	    }
  	}
  	splx(s);