Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2000 14:05:11 +0100 (MET)
From:      hm@hcs.de (Hellmuth Michaelis)
To:        dave@turbocat.de (David Wetzel)
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: crash
Message-ID:  <20000216130511.192EF3891@hcswork.hcs.de>
In-Reply-To: <200002160146.CAA00638@cat.turbocat.de> from David Wetzel at "Feb 16, 0 02:46:42 am"

next in thread | previous in thread | raw e-mail | index | archive | help
From the keyboard of David Wetzel:

> as on Tue, 25 Jan 2000, my machine keeps crashing.
> 
> WARNING: mclpool limit reached; increase NMBCLUSTERS
> i4b_getbuf: error - MCLGET failed, len(2048)
> panic: L1avma1pp_hscx_intr: RPF, cannot allocate new mbuf!
> 
> I run the latest public sources...

There was a memory leak in the HSCX driver and in the Fritz PCI driver. This
leak was obviously fixed only for the HSCX driver and in the Fritz PCI driver
in the new-bus (layer1-nb) directory but not in the old-bus/NetBSD (layer1)
directory for the i4b_avm_fritz_pci.c file.

Please apply the following patch to your copy of i4b_avm_fritz_pci.c (and
don't forget to tell us if it solved the problem):

*** i4b_avm_fritz_pci.c.orig	Sat Nov 27 19:45:40 1999
--- i4b_avm_fritz_pci.c	Mon Nov 29 20:08:34 1999
***************
*** 743,749 ****
  			DBGL1(L1_H_XFRERR, "avma1pp_hscx_intr", ("receive data overflow\n"));
  			error++;				
  		}
! 	
  		fifo_data_len = ((stat & HSCX_STAT_RML_MASK) >> 8);
  		
  		if(fifo_data_len == 0)
--- 743,768 ----
  			DBGL1(L1_H_XFRERR, "avma1pp_hscx_intr", ("receive data overflow\n"));
  			error++;				
  		}
! 
! 		/*
! 		 * check whether we're receiving data for an inactive B-channel
! 		 * and discard it. This appears to happen for telephony when
! 		 * both B-channels are active and one is deactivated. Since
! 		 * it is not really possible to deactivate the channel in that
! 		 * case (the ASIC seems to deactivate _both_ channels), the
! 		 * "deactivated" channel keeps receiving data which can lead
! 		 * to exhaustion of mbufs and a kernel panic.
! 		 *
! 		 * This is a hack, but it's the only solution I can think of
! 		 * without having the documentation for the ASIC.
! 		 * GJ - 28 Nov 1999
! 		 */
! 		 if (chan->state == HSCX_IDLE)
! 		 {
! 			DBGL1(L1_H_XFRERR, "avma1pp_hscx_intr", ("toss data from %d\n", h_chan));
! 			error++;
! 		 }
! 
  		fifo_data_len = ((stat & HSCX_STAT_RML_MASK) >> 8);
  		
  		if(fifo_data_len == 0)
***************
*** 836,850 ****
  							MPH_Trace_Ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
  						}
  
  					  /* move rx'd data to rx queue */
  
! 					  IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
! 				
  					  (*chan->drvr_linktab->bch_rx_data_ready)(chan->drvr_linktab->unit);
  
- 					  if(!(isic_hscx_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
- 						 activity = ACT_RX;
- 				
  					  /* alloc new buffer */
  				
  					  if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
--- 855,877 ----
  							MPH_Trace_Ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
  						}
  
+ 					  if(!(isic_hscx_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
+ 						 activity = ACT_RX;
+ 				
  					  /* move rx'd data to rx queue */
  
! 					  if (!(IF_QFULL(&chan->rx_queue)))
! 					  {
! 					  	IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
! 					  }
! 					  else
! 				       	  {
! 						i4b_Bfreembuf(chan->in_mbuf);
! 				          }
! 
! 					  /* signal upper layer that data are available */
  					  (*chan->drvr_linktab->bch_rx_data_ready)(chan->drvr_linktab->unit);
  
  					  /* alloc new buffer */
  				
  					  if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
***************
*** 1075,1081 ****
  	if(activate == 0)
  	{
  		/* deactivation */
! 		chan->state &= ~HSCX_AVMA1PP_ACTIVE;
  		avma1pp_hscx_init(sc, h_chan, activate);
  	}
  		
--- 1102,1108 ----
  	if(activate == 0)
  	{
  		/* deactivation */
! 		chan->state = HSCX_IDLE;
  		avma1pp_hscx_init(sc, h_chan, activate);
  	}
  		

hellmuth
-- 
Hellmuth Michaelis                                    Tel   +49 40 559747-70
HCS Hanseatischer Computerservice GmbH                Fax   +49 40 559747-77
Oldesloer Strasse 97-99                               Mail  hm [at] hcs.de
22457 Hamburg                                         WWW   http://www.hcs.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000216130511.192EF3891>