I've been running this command in a terminal:

watch  sh -c '"netstat -n --inet | egrep -v :6000\|:8888 | grep ESTAB | sort -k 2nr,2 
-k 3nr,3"'

It shows the established connections (excluding X and the servlet)
which have nonzero receive or send queues, i.e. which will provide
data if the socket is read, or which have data which has been written
to the socket but not yet sent over the net (not yet ack'ed?).

I noticed that my node (build 6194) has 4 or 5 with nonzero receive
queues that stay constant for hours, and upward of 40 with nonzero
send queues staying constant.  Using tcpdump, I observed that these
connections are kept open by ACK packets with window = 0, i.e.
stating that no further data will be accepted, sent every 2 or
4 minutes, and that the opposite direction has a nonzero window.

The nonzero receive queues clearly represent connections in
which the program has failed to read data from the socket,
and the nonzero send queues represent connections where the
remote port's buffers are full so that it sends back win=0.
Using lsof, I verified that freenet was the owner.  Many
threads (presumably all of them) had the device opened.

The IP number was mentioned in the log, but only a few hours
earlier.  

For example, IP 12.215.60.219:16618 is an outgoing connection 
(the local port is not the freenet port, so 16618 must be the 
freenet port of the remote IP), and it is listed as actively 
_sending_, with 3224 messages, output queue 256 KiB, sent 51 KiB, 
input queue "-", received None, idle 0 s, lifetime 343:51.
Later, the line is unchanged, with lifetime 418:27.  My
system replies ack win=0 to an ack from the remote, every
4 minutes.  (I am behind a Redhat 7.3 iptables firewall with 
port forwarding on my freenet port).

22:15:00.945282 12.215.60.219.16618 > 192.168.197.3.57099: . 0:1(1) ack 1 win 64092 
(DF)
22:15:01.404289 192.168.197.3.57099 > 12.215.60.219.16618: . ack 0 win 0 (DF)
22:19:02.048228 12.215.60.219.16618 > 192.168.197.3.57099: . 0:1(1) ack 1 win 64092 
(DF)
22:19:02.400947 192.168.197.3.57099 > 12.215.60.219.16618: . ack 0 win 0 (DF)

But this IP is listed on netstat with Recv-Q 80025.  Why would
a connection which is sending and not receiving data have such
a large receive queue?

[EMAIL PROTECTED] freenet]$ grep :16618 freenet.log
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331091, NORMAL): Long 
messageInitialStateTime 1013 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
5efad46291b8ea76
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331141, NORMAL): Long 
messageInitialStateTime 1014 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
772a97e453d8626a
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331132, NORMAL): Long 
messageInitialStateTime 1013 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
587b8c1ba29c1fd7
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331135, NORMAL): Long 
messageInitialStateTime 1012 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
d2ee421543b6727a
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331142, NORMAL): Long 
messageInitialStateTime 1013 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
cefcd16254290f18
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331137, NORMAL): Long 
messageInitialStateTime 1013 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
8fbb89d156964d4f
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331120, NORMAL): Long 
messageInitialStateTime 1011 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
c221eecff6c4ed06
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-331144, NORMAL): Long 
messageInitialStateTime 1010 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
c34de5f7b81eb104
Sep 13, 2003 3:30:18 PM (freenet.message.DataRequest, QThread-330080, NORMAL): Long 
messageInitialStateTime 1003 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
6305191f6c37a3b9
Sep 13, 2003 3:44:01 PM (freenet.ConnectionHandler$MessageSend,  write interface 
thread, NORMAL): messageSendTime 918812 for [EMAIL PROTECTED] for [EMAIL PROTECTED] 
for tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 3
Sep 13, 2003 3:44:01 PM (freenet.ConnectionHandler$MessageSend,  write interface 
thread, NORMAL): messageSendTime 918810 for [EMAIL PROTECTED] for [EMAIL PROTECTED] 
for tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 3
Sep 13, 2003 3:44:01 PM (freenet.ConnectionHandler$MessageSend,  write interface 
thread, NORMAL): messageSendTime 918812 for [EMAIL PROTECTED] for [EMAIL PROTECTED] 
for tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 3
Sep 13, 2003 3:44:01 PM (freenet.ConnectionHandler$MessageSend,  write interface 
thread, NORMAL): messageSendTime 918815 for [EMAIL PROTECTED] for [EMAIL PROTECTED] 
for tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 3
Sep 13, 2003 3:48:28 PM (freenet.message.DataRequest, QThread-332233, NORMAL): Long 
messageInitialStateTime 1922 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
62862779f60d5c55
Sep 13, 2003 3:48:28 PM (freenet.message.DataRequest, QThread-332226, NORMAL): Long 
messageInitialStateTime 1923 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
ce84a5e1dffa3a45
Sep 13, 2003 3:48:28 PM (freenet.message.DataRequest, QThread-332311, NORMAL): Long 
messageInitialStateTime 1054 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
18bd6a91e3f8d55f
Sep 13, 2003 3:48:28 PM (freenet.message.DataRequest, QThread-332309, NORMAL): Long 
messageInitialStateTime 1055 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
87a538ed404b2d40
Sep 13, 2003 3:56:22 PM (freenet.message.DataRequest, QThread-333393, NORMAL): Long 
messageInitialStateTime 2285 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
bbf7cee78f23824d
Sep 13, 2003 3:56:22 PM (freenet.message.DataRequest, QThread-333395, NORMAL): Long 
messageInitialStateTime 2290 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
3811826e71067514
Sep 13, 2003 3:56:22 PM (freenet.message.DataRequest, QThread-333396, NORMAL): Long 
messageInitialStateTime 2291 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
9cfd107c67735950
Sep 13, 2003 3:56:22 PM (freenet.message.DataRequest, QThread-333397, NORMAL): Long 
messageInitialStateTime 2294 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
2d0080cc30d20e9b
Sep 13, 2003 3:57:21 PM (freenet.message.DataRequest, QThread-333692, NORMAL): Long 
messageInitialStateTime 3249 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
352fc682f382007
Sep 13, 2003 3:57:21 PM (freenet.message.DataRequest, QThread-333691, NORMAL): Long 
messageInitialStateTime 3249 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
1ea0deef08b7efc3
Sep 13, 2003 3:57:25 PM (freenet.message.DataRequest, QThread-333790, NORMAL): Long 
messageInitialStateTime 6436 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
157d76fb13941424
Sep 13, 2003 3:57:26 PM (freenet.message.DataRequest, QThread-333801, NORMAL): Long 
messageInitialStateTime 5999 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
6e22c6011f88c444
Sep 13, 2003 3:57:26 PM (freenet.message.DataRequest, QThread-333863, NORMAL): Long 
messageInitialStateTime 4832 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
e33f1fa9b9cf934f
Sep 13, 2003 3:57:26 PM (freenet.message.DataRequest, QThread-333837, NORMAL): Long 
messageInitialStateTime 4676 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
4603b4469192c29d
Sep 13, 2003 4:09:25 PM (freenet.message.DataRequest, QThread-334978, NORMAL): Long 
messageInitialStateTime 2164 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
2cfb11699ef682a1
Sep 13, 2003 4:18:25 PM (freenet.message.DataRequest, QThread-335437, NORMAL): Long 
messageInitialStateTime 1118 : freenet.Message: DataRequest @[EMAIL PROTECTED] for 
tcp/connection: 12.215.60.219:16618,[EMAIL PROTECTED],[EMAIL PROTECTED], sending 0 @ 
db54562027a56c89

-- 
Edward J. Huff <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to