Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2015 12:53:01 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Michael Fuckner <michael@fuckner.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Ryan Stone <rysto32@gmail.com>, Steven Hartland <killing@multiplay.co.uk>
Subject:   Re: Server with 3TB Crashing at boot
Message-ID:  <20150316105301.GB2379@kib.kiev.ua>
In-Reply-To: <5506B23F.20400@fuckner.net>
References:  <20150314153941.GL2379@kib.kiev.ua> <5505160A.1020703@fuckner.net> <5505827D.6060404@fuckner.net> <5505982E.9060201@fuckner.net> <20150315193202.GS2379@kib.kiev.ua> <2138577776.537937.1426455964006.JavaMail.open-xchange@ptangptang.store> <20150316091758.GY2379@kib.kiev.ua> <5506ADA4.8020207@fuckner.net> <20150316103140.GA2379@kib.kiev.ua> <5506B23F.20400@fuckner.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 */



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