This has nothing to do with the handeling of RequestFaileds, your just not
using a very good test technique. RequestFailed sets KeepAlive=false, so after
sending it the connection is closed, and it will not listen to any more
messages on it. Therefore it did not get the second RequestFailed.

Use debugging level logging in testing, and you would have seen the connection
say it was closing.

On Thu, 13 Apr 2000, Bill Trost wrote:
> Hmm, I just noticed a problem with how InsertRequests are handled.  If
> an InsertRequest generates a RequestFailed, the node does not take any
> action on receipt of the RequestFailed; instead it waits until the
> timeout on the InsertRequest occurs.  The client times out faster, so
> all is doomed.
> 
> To discover this, I put "tcp/127.0.0.1:7" (the local echo port) as
> my sole nodes.config entry (other entries can exist, too, but then
> the problem *may* not occur).  The node sees the echoed request as
> a backtrack and sends itself a RequestFailed.  The RequestFailed is
> received and essentially ignored.
> 
> 
> The client log is:
>       Node running on 1551
>       5b0994bebff34d89 - HandshakeRequest -> tcp/127.0.0.1:39114
>       5b0994bebff34d89 - HandshakeReply <- tcp/127.0.0.1:39114
>       Kludgy handshake handling worked. Src:tcp/127.0.0.1:39114 htl:1 depth:1 
> id:5b0994bebff34d89 type:Freenet.message.HandshakeReply
>       b537e81eed6b8b45 - InsertRequest -> tcp/127.0.0.1:39114
>       Waiting another 15 seconds for a response
>       Network timed out waiting for a reply from the server.
> 
> 
> The server log is:
>       13-Apr-00 10:45:14 AM:Core.java:Normal:Node running on 39114
>       .freenet/store_39114
>       13-Apr-00 10:45:14 AM:support/Ticker.java:Normal:Thread started
>       13-Apr-00 10:45:23 AM:Node.java:Minor:Accepted 
> connection:tcp/127.0.0.1:1552
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#1:Minor:Rawmessage:
>       HandshakeRequest
>       {Depth=1, HopsToLive=1, Source=tcp/127.0.0.1:1551, 
> UniqueID=5b0994bebff34d89}
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#1:Normal:5b0994bebff34d89 
> - HandshakeRequest <- tcp/127.0.0.1:1552
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#1:Normal:5b0994bebff34d89 
> - HandshakeReply -> tcp/127.0.0.1:1552
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#1:Minor:Rawmessage:
>       InsertRequest
>       {Depth=10, SearchKey=608E01334F5575F10813EFA40CE0102F2DC0A75E, 
> HopsToLive=3, Source=tcp/127.0.0.1:1551, UniqueID=b537e81eed6b8b45}
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#1:Normal:b537e81eed6b8b45 
> - InsertRequest <- tcp/127.0.0.1:1552
>       13-Apr-00 10:45:24 AM:message/Request.java:Minor:Forwarding query for 
> 608E01334F5575F10813EFA40CE0102F2DC0A75E
>       13-Apr-00 10:45:24 AM:message/Request.java:Minor:Forwarding query to 
> tcp/199.2.111.241:19114
>       13-Apr-00 10:45:24 AM:Node.java:Error:Connection Error: 
> Freenet.ConnectTimedOutException
>       13-Apr-00 10:45:24 AM:message/Request.java:Minor:Forwarding query to 
> tcp/129.116.50.211:19114
>       13-Apr-00 10:45:24 AM:Node.java:Error:Connection Error: 
> Freenet.ConnectTimedOutException
>       13-Apr-00 10:45:24 AM:message/Request.java:Minor:Forwarding query to 
> tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:a9ed2417476b1815 
> - HandshakeRequest -> tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Minor:Rawmessage:
>       HandshakeRequest
>       {Depth=1, HopsToLive=1, Source=tcp/127.0.0.1:39114, 
> UniqueID=a9ed2417476b1815}
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:a9ed2417476b1815 
> - HandshakeRequest <- tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:a9ed2417476b1815 
> - HandshakeReply -> tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Minor:Rawmessage:
>       HandshakeReply
>       {Depth=1, HopsToLive=1, Source=tcp/127.0.0.1:39114, Revision=1.18, 
> Version=1.2, Build=119, UniqueID=a9ed2417476b1815}
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:a9ed2417476b1815 
> - HandshakeReply <- tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:HandshakeReply.java:Minor:Setting handshake from 
> tcp/127.0.0.1:39114
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:b537e81eed6b8b45 
> - InsertRequest -> tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Minor:Rawmessage:
>       InsertRequest
>       {Depth=11, SearchKey=608E01334F5575F10813EFA40CE0102F2DC0A75E, 
> HopsToLive=2, Source=tcp/127.0.0.1:1551, UniqueID=b537e81eed6b8b45}
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:b537e81eed6b8b45 
> - InsertRequest <- tcp/127.0.0.1:7
>       13-Apr-00 10:45:24 AM:message/Request:Minor:loop - backtracking
>       13-Apr-00 10:45:24 AM:ConnectionHandler.java#2:Normal:b537e81eed6b8b45 
> - RequestFailed -> tcp/127.0.0.1:7
>       13-Apr-00 10:46:11 AM:Node.java:Error:Connection Error: 
> Freenet.ConnectTimedOutException
>       13-Apr-00 10:46:11 AM:message/RequestCB.java:Normal:Couldn't restart on 
> timeout because connect failed to tcp/127.0.0.1:1551
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to