<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Norman Rasmussen wrote:
<blockquote
cite="mid:5b698f5a0903311103t3f05a4e6rd18b1cc64da5e6b7@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type"
content="text/html; charset=ISO-8859-1">
<span>setsockopt doesn't return ENOMEM at any point, so it's<span> </span></span>either,
sock_kmalloc in ipv6_sock_mc_join failing or <span>kzalloc in
ipv6_dev_mc_inc failing. Either way you're running out of kernel
memory, which is very bad.</span>
<div><span><br>
</span></div>
<div><span>see: <a moz-do-not-send="true"
href="http://www.google.com/codesearch/p?hl=en#CJH4YAGt3ds/net/ipv6/mcast.c&q=linux-2.6.25%20mcast.c%20ipv6_sock_mc_join%20ENOMEM">http://www.google.com/codesearch/p?hl=en#CJH4YAGt3ds/net/ipv6/mcast.c&q=linux-2.6.25%20mcast.c%20ipv6_sock_mc_join%20ENOMEM</a></span></div>
<div><span><br>
</span></div>
<div><span>does slabtop show anything interesting?</span></div>
<div><span><br>
</span></div>
<div><span>another thing to check is is errno zero _before_ the
setsockopt call? (i.e. is it the setsockopt that's failing, and not
just the call immediately before it)<br>
</span><br>
</div>
<div>also does it always fails on the same interface? i.e. if you
remove the first 10 interfaces, does it:</div>
<div> get to 275 interfaces and die - i.e. it's always failing on
the same interface</div>
<div> get to 285 interfaces and die - i.e. it's successfully
configured the 285th interface (but we skipped the first 10)</div>
</blockquote>
<br>
I modified the patch like this:<br>
<br>
--- device-linux.c.bak 2009-04-01 08:20:26.000000000 -0500<br>
+++ device-linux.c 2009-04-01 08:17:56.000000000 -0500<br>
@@ -178,12 +178,14 @@<br>
mreq.ipv6mr_multiaddr.s6_addr32[0] =
htonl(0xFF020000); <br>
mreq.ipv6mr_multiaddr.s6_addr32[3] = htonl(0x2); <br>
<br>
+ errno = 0;<br>
if (setsockopt(sock, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &mreq,
sizeof(mreq)) < 0)<br>
{<br>
/* linux-2.6.12-bk4 returns error with HUP signal but
keep listening */<br>
if (errno != EADDRINUSE)<br>
{<br>
flog(LOG_ERR, "can't join ipv6-allrouters on
%s", iface->Name);<br>
+ flog(LOG_ERR, "Error %d: %m", errno);<br>
return (-1);<br>
}<br>
}<br>
<br>
<br>
And when starting, I get:<br>
<br>
Starting radvd: [Apr 01 08:21:40] radvd: can't join ipv6-allrouters on
bond0.2011.22<br>
[Apr 01 08:21:40] radvd: Error 12: Cannot allocate memory<br>
[Apr 01 08:21:40] radvd: error parsing or activating the config file:
/etc/radvd.conf<br>
failed.<br>
<br>
The error is consistent, in that the 285th interface triggers the
error. It does not matter which interface I comment out - I've
commented out the first, the last, several in the middle - as long as
I've defined 284, radvd starts.<br>
<br>
I have not used slabtop before, so I'm not sure I would notice
something out of the ordinary. I've captured the output of
/proc/slabinfo just before starting radvd, and just after
(successfully) starting radvd. You can find them here:<br>
<br>
<a class="moz-txt-link-freetext" href="http://support.olp.net/radvd/">http://support.olp.net/radvd/</a><br>
<br>
I also included my complete /etc/radvd.conf, and my debian
/etc/network/interfaces (which includes IP assignments).<br>
<br>
I've tried restarting some other daemons - bind, quagga, dibbler,
dhcpd. Even with several of them shut down, I'm still hitting the error
on the 284th interface.<br>
<br>
I was thinking this could be a resource limit of some sort. I modified
my start script so that radvd runs as the root user (rather than the
radvd user), but same thing. This is the output of 'ulimit -a' as the
root user, just before starting radvd:<br>
<br>
north:/etc# ulimit -a<br>
core file size (blocks, -c) 0<br>
data seg size (kbytes, -d) unlimited<br>
max nice (-e) 0<br>
file size (blocks, -f) unlimited<br>
pending signals (-i) unlimited<br>
max locked memory (kbytes, -l) unlimited<br>
max memory size (kbytes, -m) unlimited<br>
open files (-n) 1024<br>
pipe size (512 bytes, -p) 8<br>
POSIX message queues (bytes, -q) unlimited<br>
max rt priority (-r) 0<br>
stack size (kbytes, -s) 8192<br>
cpu time (seconds, -t) unlimited<br>
max user processes (-u) unlimited<br>
virtual memory (kbytes, -v) unlimited<br>
file locks (-x) unlimited<br>
<br>
I tried increasing the stack size (ulimit -s 16384) but that didn't
help. <br>
<br>
I have not tried restarting the system however.<br>
<br>
- Dan<br>
<i></i>
</body>
</html>