Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sent messages are not always received #40

Open
voidstarstar opened this issue Sep 2, 2015 · 1 comment
Open

Sent messages are not always received #40

voidstarstar opened this issue Sep 2, 2015 · 1 comment

Comments

@voidstarstar
Copy link
Contributor

I have a setup where many (50-1000) messages are sent from one Quasar actor to another.

I receive the following error on the recipient end:

68325 [WARN] UDPComm: Exception caught in channel [id: 0x5c10b3ac, 0.0.0.0/0.0.0.0:7052]:  java.lang.RuntimeException java.io.EOFException
java.lang.RuntimeException: java.io.EOFException
    at co.paralleluniverse.common.io.Persistables$1.read(Persistables.java:53) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.core.Message.read(Message.java:553) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.core.Message.fromByteBuffer(Message.java:207) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.netty.MessagePacket.fromByteBuffer(MessagePacket.java:181) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.netty.MessagePacketCodec.decode(MessagePacketCodec.java:54) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.netty.OneToOneCodec.handleUpstream(OneToOneCodec.java:59) ~[galaxy-1.4.jar:1.4]
    at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [netty-3.9.2.Final.jar:?]
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [netty-3.9.2.Final.jar:?]
    at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [netty-3.9.2.Final.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45-internal]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45-internal]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal]
Caused by: java.io.EOFException
    at co.paralleluniverse.common.io.ByteBufferInputStream.readFully(ByteBufferInputStream.java:94) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.core.Message$MSG.readNoHeader(Message.java:1404) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.core.Message$LineMessage.read1(Message.java:665) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.galaxy.core.Message$1.read(Message.java:471) ~[galaxy-1.4.jar:1.4]
    at co.paralleluniverse.common.io.Persistables$1.read(Persistables.java:51) ~[galaxy-1.4.jar:1.4]
    ... 11 more

If I send many messages using the ping pong example, I receive a similar error:

11:37:30.624 �[33m[udpCommReceiveExecutor-3]                  netty.UDPComm [WARN ]�[m {} Exception caught in channel [id: 0x26fa984c, 0.0.0.0/0.0.0.0:7052]:  java.lang.RuntimeException java.io.EOFException java.lang.RuntimeException: java.io.EOFException
    at co.paralleluniverse.common.io.Persistables$1.read(Persistables.java:53)
    at co.paralleluniverse.galaxy.core.Message.read(Message.java:553)
    at co.paralleluniverse.galaxy.core.Message.fromByteBuffer(Message.java:207)
    at co.paralleluniverse.galaxy.netty.MessagePacket.fromByteBuffer(MessagePacket.java:181)
11:37:30.624 �[36m[udpCommReceiveExecutor-3]                  netty.UDPComm [DEBUG]�[m {} Exception caught in channel java.lang.RuntimeException: java.io.EOFException
    at co.paralleluniverse.common.io.Persistables$1.read(Persistables.java:53)
    at co.paralleluniverse.galaxy.core.Message.read(Message.java:553)
    at co.paralleluniverse.galaxy.core.Message.fromByteBuffer(Message.java:207)
    at co.paralleluniverse.galaxy.netty.MessagePacket.fromByteBuffer(MessagePacket.java:181)
11:37:30.625 �[32m[udpCommReceiveExecutor-3]                  netty.UDPComm [INFO ]�[m {} Channel exception: java.lang.RuntimeException java.io.EOFException 
11:37:30.625 �[36m[udpCommReceiveExecutor-3]                  netty.UDPComm [DEBUG]�[m {} Channel exception java.lang.RuntimeException: java.io.EOFException
    at co.paralleluniverse.common.io.Persistables$1.read(Persistables.java:53)
    at co.paralleluniverse.galaxy.core.Message.read(Message.java:553)
    at co.paralleluniverse.galaxy.core.Message.fromByteBuffer(Message.java:207)
    at co.paralleluniverse.galaxy.netty.MessagePacket.fromByteBuffer(MessagePacket.java:181)

There are also many other logging messages, but I do not know if they are related.

I can try to come up with a short example if necessary.

@voidstarstar
Copy link
Contributor Author

Also, I've discovered that if I rate limit the messages on the sender end, even by a short amount, then the issue goes away.

Strand.sleep(1);

Sleeping for a minimum of 1 millisecond appears to act as a temporary workaround for me.

This looks like it may be related to #23. That issue has been open for over 2 years, so I am unsure if it had been resolved in the mean time. I believe that I am using an unbounded mailbox.

Edit: If this the same issue and not just a related one, I apologize for the duplication and this issue can be closed. Hopefully the extra logs that I included are useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant