Server with 3TB Crashing at boot

Konstantin Belousov kostikbel at gmail.com
Mon Mar 16 10:53:07 UTC 2015


On Mon, Mar 16, 2015 at 11:36:47AM +0100, Michael Fuckner wrote:
> On 03/16/2015 11:31 AM, Konstantin Belousov wrote:
> > On Mon, Mar 16, 2015 at 11:17:08AM +0100, Michael Fuckner wrote:
> >> Just generated, anything I should test in debugger?
> >> Else I'll do the same with STABLE next.
> > With stable, it is only interesting if 'fault' lines are gone.
> >
> >>
> >> http://dedi3.fuckner.net/~molli123/temp/head.txt
> >>
> >> doing minimal network traffic causes the kernel to panic.
> > Please do the following:
> > gdb kernel.debug (your kernel should be build with makeoptions	DEBUG=-g)
> > in gdb do
> > (gdb) list *dmar_bus_dmamap_load_buffer+0x53
> >
> 
> http://dedi3.fuckner.net/~molli123/temp/gdb.txt <- is this what you need?

No.  gdb must be run on the live system, at the shell prompt.  You did it
from the ddb.

Anyway, as a guess from reading ixgbe source and from my experience with
the em/igb, you could try the following.

diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index db202fd..b34a72b 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -3765,7 +3765,6 @@ ixgbe_txeof(struct tx_ring *txr)
 			    buf->map);
 			m_freem(buf->m_head);
 			buf->m_head = NULL;
-			buf->map = NULL;
 		}
 		buf->eop = NULL;
 		++txr->tx_avail;
@@ -3791,7 +3790,6 @@ ixgbe_txeof(struct tx_ring *txr)
 				    buf->map);
 				m_freem(buf->m_head);
 				buf->m_head = NULL;
-				buf->map = NULL;
 			}
 			++txr->tx_avail;
 			buf->eop = NULL;
@@ -3954,8 +3952,7 @@ ixgbe_allocate_receive_buffers(struct rx_ring *rxr)
 
 	for (i = 0; i < rxr->num_desc; i++, rxbuf++) {
 		rxbuf = &rxr->rx_buffers[i];
-		error = bus_dmamap_create(rxr->ptag,
-		    BUS_DMA_NOWAIT, &rxbuf->pmap);
+		error = bus_dmamap_create(rxr->ptag, 0, &rxbuf->pmap);
 		if (error) {
 			device_printf(dev, "Unable to create RX dma map\n");
 			goto fail;

There seems to be an unload leak as well, but lets fix the panic first.
I.e. try the patch below only after you confirm that the patch above
helps.

diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index db202fd..b34a72b 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
 		m_free(rbuf->buf);
 		rbuf->buf = NULL;
 	}
+	bus_dmamap_unload(rxr->ptag, rbuf->pmap);
 
 	rbuf->flags = 0;
  
@@ -4732,6 +4730,7 @@ ixgbe_rxeof(struct ix_queue *que)
 			sendmp->m_flags |= M_PKTHDR;
 			sendmp->m_pkthdr.len = mp->m_len;
 		}
+		bus_dmamap_unload(rxr->ptag, rbuf->pmap);
 		++processed;
 
 		/* Pass the head pointer on */


More information about the freebsd-hackers mailing list