lkml.org 
[lkml]   [1999]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectTCP Socket Kernel BUG(?) 2.3.11 - Please Help
Date
O.K ... So I'm going to do it... Yes send mail to the linux-kernel list...

Yes, I think I have found a bug in the 2.3.x TCP code (They all smile...)

History:

1. I needed >4096 users.
2. Ingo M. points me to his code to get rid of the GDT limitations
(great code!)
3. I build a 2.3.11 pre xx kernel (Now 2.3.11)
4. I startup 8000 users running my application which connect to a
web server through a socket.
5. User 495 gets an error when connecting.. errno=99 (EADDRNOTAVAIL)
(What is this?) (Retry's until it connects)
6. User 750 gets the same error... user 1004 gets the same error...
7. Yep... 1004, 1257, 1509... every 256th user.
8. O.K. Debug time.. I add the retry with fprinf's... Each 256th
user that fails has to retry one more time than the
previously failed user.
User 495 - retries 1 time, 750 retries 2 times, 1004 retries
3 times... etc...
8.5 - I test my sanity and go back to 2.2 to verify it still works..
(Yes it does...)
9. I dig into the kernel code and find the offending routine
tcp_v4_connect in tcp_ipv4.c
10. I spend the next few days debugging.. The EADDRNOTAVAIL is
returned when the tcp_v4_unique_address returns false.
11. I cannot find the error in any of the ipv4 code. (Then I haven't
hacked at kernels for years...)
12. I write a simple program to produce the error and send it to the
guys (gals too) who eat this stuff for breakfast..

Attached: ts.tar.gz

ts.c - Simple socket program to connect to a host on a port.
ts - The executable
ts.sh - Simple shell script to run ts.c - starts and kills
1000 users.
config - My config file when building 2.3.11 kernel (Yes it
is complied with gcc 2.7.2.3)
maxpatch - a patch file against 2.3.11 to setup kernel if
you want to run 8000 users (patch -p0 <maxpatch)
Note 1: maxpatch is not needed to test with 1000
users.
Note 2: Oh yes. you need to "echo 10,000
>/dev/proc/sys/fs/file-max" to run 1000 users.

I have now subscribed to the linux-kernel mailing list and
will be watching for comments.


Thanks, Mike...

Michael V. Nikolaiev
Manager, Database Performance Engineering
Enterprise Solutions Division
Tel: (281) 518-9928
Fax: (281) 514-8375
Email: mike.nikolaiev@compaq.com
<<ts.tar.gz>>

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 13:53    [W:5.683 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site