Problems with /proc/net/tcp6 - possible bug - ipv6

From: PK
Date: Sat Jan 22 2011 - 01:37:50 EST


Creating many ipv6 connections hits a ceiling on connections/fds ; okay, fine.

But in my case I'm seeing millions of entries spring up within a few seconds and
then vanish within a few minutes, in /proc/net/tcp6 (vanish due to garbage
collection?)

Furthermore I can trigger this easily on vanilla kernels from 2.6.36 to
2.6.38-rc1-next-20110121 inside a ubuntu 10.10 amd64 vm, causing the kernel to
spew warnings. There is also some corruption in the logs (see kernel-sample.log
line 296), but that may be unrelated.

More explanation, kernel config of the primary machine I saw this on, sample
ruby script to reproduce (inside the ubuntu VMs I apt-get and use ruby-1.9.1),
are located at
https://github.com/runningdogx/net6-bug

Seems to only affect 64-bit. So far I have not been able to reproduce on 32-bit
ubuntu VMs of any kernel version.
Seems to only affect IPv6. So far I have not been able to reproduce using IPv4
connections (and watching /proc/net/tcp of course).
Does not trigger the bug if the connections are made to ::1. Only externally
routable local and global IPv6 addresses seem to cause problems.
Seems to have been introduced between 2.6.35 and 2.6.36 (see README on github
for more kernels I've tried)

All the tested Ubuntu VMs are stock 10.10 userland, with vanilla kernels (the
latest ubuntu kernel is 2.6.35-something, and my initial test didn't show it
suffering from this problem)

Originally noticed on separate Gentoo 64-bit non-vm system when doing web
benchmarking.

not subscribed, so please keep me in cc although I'll try to follow the thread



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/