tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: nexthop cache separation



On Apr 7,  3:42pm, ozaki-r%netbsd.org@localhost (Ryota Ozaki) wrote:
-- Subject: Re: RFC: nexthop cache separation

| On Thu, Apr 7, 2016 at 12:52 AM, Christos Zoulas <christos%zoulas.com@localhost> wrote:
| > On Apr 6, 11:53pm, ozaki-r%netbsd.org@localhost (Ryota Ozaki) wrote:
| > -- Subject: Re: RFC: nexthop cache separation
| >
| > | I set up an nfs client on NetBSD and an nfs server was Linux
| > | (that I can set up quickly :-/).
| > |
| > | So you set up an nfs server and nfs client(s) and
| > | the panic happens on the server, right?
| >
| > My nfs client is linux, and yes the panic happens on the server.
| > I also have 2 interfaces and use it as an IPv6 gateway.
| 
| It seems that just setting up an nfs server and IPv6 gateway
| and providing some load by nfs clients (and IPv6 traffic)
| cannot reproduce the problem. Could you please provide more
| details setups: the kernel configuration, nfs setups and outputs
| of netstat -nr/arp -na/ndp -na/ifconfig/ps xa (in a private mail
| if confidential).

It also crashes for me without nfs. It is a dual interface machine running
both ipv4 and ipv6 and doing packet forwarding for both protocols. My kernel
config has all the pax options turned on (ASLR/MPROTECT/SEGVGUARD) and my
userland is PIE/SSP. This all used to work before this change. Now I only have
to try to compile a kernel and it dies (without NFS). With NFS I cannot even
boot.

Also if I put some debugging, it fires during boot... I don't see why we drop
routing messages. I fixed the RTM_MISS issue, but there are probably more.

christos

Index: uipc_socket2.c
===================================================================
RCS file: /cvsroot/src/sys/kern/uipc_socket2.c,v
retrieving revision 1.122
diff -u -u -r1.122 uipc_socket2.c
--- uipc_socket2.c	24 Aug 2015 22:21:26 -0000	1.122
+++ uipc_socket2.c	7 Apr 2016 12:17:49 -0000
@@ -968,11 +968,15 @@
 		if (n->m_next == NULL)	/* keep pointer to last control buf */
 			break;
 	}
-	if (space > sbspace(sb))
+	if (space > sbspace(sb)) {
+printf("%s, %d: %d %ld\n", __func__, __LINE__, space, sbspace(sb));
 		return (0);
+	}
 	m = m_get(M_DONTWAIT, MT_SONAME);
-	if (m == NULL)
+	if (m == NULL) {
+printf("%s, %d: nomem\n", __func__, __LINE__);
 		return (0);
+	}
 	MCLAIM(m, sb->sb_mowner);
 	/*
 	 * XXX avoid 'comparison always true' warning which isn't easily
@@ -982,6 +986,7 @@
 	if (len > MLEN) {
 		MEXTMALLOC(m, asa->sa_len, M_NOWAIT);
 		if ((m->m_flags & M_EXT) == 0) {
+printf("%s, %d: %d %ld\n", __func__, __LINE__, len, MLEN);
 			m_free(m);
 			return (0);
 		}

christos


Home | Main Index | Thread Index | Old Index