Date: Thu, 4 May 2000 18:44:09 -0400 (EDT) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: garyj@muc.de Cc: dillon@apollo.backplane.com, freebsd-current@FreeBSD.ORG Subject: Re: NFS, rl0 and Alpha Message-ID: <200005042244.SAA07824@skynet.ctr.columbia.edu> In-Reply-To: <200005041941.VAA36623@peedub.muc.de> from "Gary Jennejohn" at May 4, 2000 09:41:47 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Gary Jennejohn had to walk into mine and say: > OK. Unfortunately, gdb core dumps when I try to analyze a crash dump > with a debugging kernel :( Even worse, gdb core dumps when I try to > run a debugging gdb in gdb to find out why gdb is core dumping when > I try to debug a kernel with symbols :(( Wonderful. I suspect this may have something to do with the way packets sometimes wrap from the end of the RX buffer pool to the beginning. This might result in fragmentation across multiple mbufs in some cases (I think). If I squint hard enough, I can see a way for the data to end up misaligned in one of the additional mbufs. Try this patch. It's an untested hack (I don't have a RealTek card in a test box right this second) but should fix the problem if it's what I think it is. -Bill P.S.: Regardless, somebody should fix gdb. -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" ============================================================================= *** if_rl.c.orig Sat Apr 29 14:15:10 2000 --- if_rl.c Thu May 4 22:16:31 2000 *************** *** 913,919 **** goto fail; } ! sc->rl_cdata.rl_rx_buf = contigmalloc(RL_RXBUFLEN + 32, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->rl_cdata.rl_rx_buf == NULL) { --- 911,917 ---- goto fail; } ! sc->rl_cdata.rl_rx_buf = contigmalloc(RL_RXBUFLEN + 1518, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->rl_cdata.rl_rx_buf == NULL) { *************** *** 1122,1129 **** wrap = (sc->rl_cdata.rl_rx_buf + RL_RXBUFLEN) - rxbufpos; if (total_len > wrap) { m = m_devget(rxbufpos - RL_ETHER_ALIGN, ! wrap + RL_ETHER_ALIGN, 0, ifp, NULL); if (m == NULL) { ifp->if_ierrors++; printf("rl%d: out of mbufs, tried to " --- 1120,1132 ---- wrap = (sc->rl_cdata.rl_rx_buf + RL_RXBUFLEN) - rxbufpos; if (total_len > wrap) { + /* + * Fool m_devget() into thinking we want to copy + * the whole buffer so we don't end up fragmenting + * the data. + */ m = m_devget(rxbufpos - RL_ETHER_ALIGN, ! total_len + RL_ETHER_ALIGN, 0, ifp, NULL); if (m == NULL) { ifp->if_ierrors++; printf("rl%d: out of mbufs, tried to " *************** *** 1132,1145 **** m_adj(m, RL_ETHER_ALIGN); m_copyback(m, wrap, total_len - wrap, sc->rl_cdata.rl_rx_buf); - if (m->m_len < sizeof(struct ether_header)) - m = m_pullup(m, - sizeof(struct ether_header)); - if (m == NULL) { - printf("rl%d: m_pullup failed", - sc->rl_unit); - ifp->if_ierrors++; - } } cur_rx = (total_len - wrap + ETHER_CRC_LEN); } else { --- 1135,1140 ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005042244.SAA07824>