As I understand it this should only happen every 200ms or so (maybe more
often because of other things happening, but it shouldn't tie up the
CPU). Does it tie up the CPU?

On Tue, May 16, 2006 at 08:54:56AM -0500, David Sowder (Zothar) wrote:
> Matthew Toseland wrote:
> >What is the stack trace? At what point in PacketSender are we trying to
> >send the messages, or is it from somewhere else?
> >  
> Here's a snippet from a stack trace I got after adding the exception to 
> the Logger call:
> 
> May 16, 2006 13:50:24:843 (freenet.support.LimitedRangeIntByteArrayMap, 
> PacketSender thread for 0, NORMAL): 
> freenet.support.LimitedRangeIntByteArrayMap at 3ce43ce4 WOULD BLOCK: 
> lockNeverBlock(71368) - minValue = 71240, maxValue = 71240, maxRange=128
> May 16, 2006 13:50:24:843 (freenet.node.FNPPacketMangler, PacketSender 
> thread for 0, NORMAL): Caught freenet.support.WouldBlockException while 
> sending messages, requeueing remaining messages
> freenet.support.WouldBlockException
>        at java.lang.Throwable.<init>(Throwable.java:57)
>        at 
> freenet.io.comm.LowLevelFilterException.<init>(LowLevelFilterException.java:10)
>        at 
> freenet.support.LimitedRangeIntByteArrayMap.lockNeverBlock(LimitedRangeIntByteArrayMap.java:137)
>        at 
> freenet.node.KeyTracker.allocateOutgoingPacketNumberNeverBlock(KeyTracker.java:664)
>        at 
> freenet.node.FNPPacketMangler.processOutgoingPreformatted(FNPPacketMangler.java:1021)
>        at 
> freenet.node.FNPPacketMangler.innerProcessOutgoing(FNPPacketMangler.java:943)
>        at 
> freenet.node.FNPPacketMangler.processOutgoingOrRequeue(FNPPacketMangler.java:891)
>        at freenet.node.PacketSender.realRun(PacketSender.java:151)
>        at freenet.node.PacketSender.run(PacketSender.java:42)
>        at java.lang.Thread.run(Thread.java:786)
> May 16, 2006 13:50:24:844 (freenet.node.PeerNode, PacketSender thread 
> for 0, NORMAL): Requeueing 83 messages on 
> freenet.node.PeerNode@[same_snipped_peer]
> May 16, 2006 13:50:24:852 (freenet.support.LimitedRangeIntByteArrayMap, 
> PacketSender thread for 0, NORMAL): 
> freenet.support.LimitedRangeIntByteArrayMap at 3ce43ce4 WOULD BLOCK: 
> lockNeverBlock(71368) - minValue = 71240, maxValue = 71240, maxRange=128
> May 16, 2006 13:50:24:852 (freenet.node.FNPPacketMangler, PacketSender 
> thread for 0, NORMAL): Caught freenet.support.WouldBlockException while 
> sending messages, requeueing remaining messages
> freenet.support.WouldBlockException
>        at java.lang.Throwable.<init>(Throwable.java:57)
>        at 
> freenet.io.comm.LowLevelFilterException.<init>(LowLevelFilterException.java:10)
>        at 
> freenet.support.LimitedRangeIntByteArrayMap.lockNeverBlock(LimitedRangeIntByteArrayMap.java:137)
>        at 
> freenet.node.KeyTracker.allocateOutgoingPacketNumberNeverBlock(KeyTracker.java:664)
>        at 
> freenet.node.FNPPacketMangler.processOutgoingPreformatted(FNPPacketMangler.java:1021)
>        at 
> freenet.node.FNPPacketMangler.innerProcessOutgoing(FNPPacketMangler.java:943)
>        at 
> freenet.node.FNPPacketMangler.processOutgoingOrRequeue(FNPPacketMangler.java:891)
>        at freenet.node.PacketSender.realRun(PacketSender.java:151)
>        at freenet.node.PacketSender.run(PacketSender.java:42)
>        at java.lang.Thread.run(Thread.java:786)
> May 16, 2006 13:50:24:854 (freenet.node.PeerNode, PacketSender thread 
> for 0, NORMAL): Requeueing 83 messages on 
> freenet.node.PeerNode@[same_snipped_peer]
> 
> >On Mon, May 15, 2006 at 04:23:05PM -0500, David Sowder (Zothar) wrote:
> >  
> >>Matthew Toseland wrote:
> >>    
> >>>Check the stack trace. WouldBlockException is thrown when a peer is so
> >>>backlogged that we can't allocate a new packet number. So we requeue the
> >>>messages we need to send, since we have pulled them off the queue in
> >>>order to send them, and we can't send them yet.=
> >>> 
> >>>      
> >>OK, it seems I did understand what's going on and apparently there's not 
> >>bigger cause than the peer is backlogged, so it looks like I didn't miss 
> >>anything (which is good).
> >>
> >>What do you think of the waiting between queued message send retry 
> >>attempts idea?
> >>
> >>    
> >>>On Sun, May 14, 2006 at 01:32:27PM -0500, David Sowder (Zothar) wrote:
> >>> 
> >>>      
> >>>>Perhaps we should wait a little bit before trying to resend queued 
> >>>>messages?  Perhaps the wait time should be proportional to the number 
> >>>>of messages queued, up to some threshold (maybe keepalive send 
> >>>>frequency)?
> >>>>
> >>>>According to the source:
> >>>>
> >>>>  public void requeueMessageItems(MessageItem[] messages, int offset, 
> >>>>int length, boolean dontLog) {
> >>>>      // Will usually indicate serious problems
> >>>>
> >>>>What could cause this?  Failure to get acks from a peer for awhile?
> >>>>
> >>>>
> >>>>
> >>>>May 14, 2006 17:54:59:874 (freenet.support.LimitedRangeIntByteArrayMap, 
> >>>>PacketSender thread for 0, NORMAL): 
> >>>>freenet.support.LimitedRangeIntByteArrayMap at 1e64cca WOULD BLOCK: 
> >>>>lockNeverBlock(47574) - minValue = 47446, maxValue = 47446, maxRange=128
> >>>>May 14, 2006 17:54:59:874 (freenet.node.FNPPacketMangler, PacketSender 
> >>>>thread for 0, NORMAL): Caught freenet.support.WouldBlockException while 
> >>>>sending messages, requeueing remaining messages
> >>>>        
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> 

-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20060516/41224914/attachment.pgp>

Reply via email to