Skip to contentSkip to conversation

net: More verbose message for too-many-orphans.

net-next Ben Greear 2 participants 2 messages Aug 9, 2010 – Aug 10, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

The original message doesn't give much clue as to what is actually going wrong or how to fix it.

---
:100644 100644 808bb92... 96a7ec2... M net/ipv4/tcp_timer.c

 net/ipv4/tcp_timer.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
net/ipv4/tcp_timer.c +5 -1
index 808bb92..96a7ec2 100644
@@ -79,7 +79,11 @@ static int tcp_out_of_resources(struct sock *sk, int do_reset)
 
 	if (tcp_too_many_orphans(sk, orphans)) {
 		if (net_ratelimit())
-			printk(KERN_INFO "Out of socket memory\n");
+			printk(KERN_INFO "Out of socket memory, orphans: %d/%d"
+			       " tcp_memory_allocated: %d/%d\n",
+			       orphans, sysctl_tcp_max_orphans,
+			       atomic_read(&tcp_memory_allocated),
+			       sysctl_tcp_mem[2]);
 
 		/* Catch exceptional cases, when connection requires reset.
 		 *      1. Last segment was sent recently. */
Signature · 1 line
1.6.2.5
maintainer
#1 lore raw

From: Ben Greear <[email protected]>
Date: Mon, 9 Aug 2010 12:00:02 -0700

Quoted 4 lines

The original message doesn't give much clue as to what is actually going wrong or how to fix it.

Dumping a bunch of values obtainable via sysctl is pointless.

The only non-sysctl value you're dumping is 'orphans' and based upon the sysctl values you can determine whether it made the check inside of tcp_too_many_orphans() trigger, and in what way.

I'm not applying this, sorry.