java.io.EOFException

33 views
Skip to first unread message

Josh D

unread,
Feb 25, 2013, 6:36:48 PM2/25/13
to ag...@googlegroups.com
We're using Agnos with Python and Java.  In the Java->Python interface, we hit a java.io.EOFException after running for a while.  This is the stack trace:

java.io.EOFException: request to read more than available
  at agnos.util.BoundedInputStream.read(BoundedInputStream.java:52)
  at agnos.transports.BaseTransport.read(BaseTransport.java:203)
  at agnos.packers.AbstractPacker._read(AbstractPacker.java:33)
  at agnos.packers._Int32.unpack(_Int32.java:43)
  at agnos.packers._Buffer.unpack(_Buffer.java:34)
  at agnos.packers._Str.unpack(_Str.java:34)
  at agnos.protocol.ClientUtils.loadProtocolException(ClientUtils.java:190)
  at agnos.protocol.ClientUtils.processIncoming(ClientUtils.java:225)
  at agnos.protocol.ClientUtils.waitReply(ClientUtils.java:266)
  at agnos.protocol.ClientUtils.getReply(ClientUtils.java:273)
  at agnos.protocol.ClientUtils.getReply(ClientUtils.java:289)
  at GroundClient.client_bindings.GroundClient$Client$_Functions.sync_900048(GroundClient.java:569)
  at GroundClient.client_bindings.GroundClient$ScriptListenerProxy.scriptUpdate(GroundClient.java:393)
  at com.lmco.ground.InControlService$ProcStatusForwarder.procStatusUpdate(InControlService.java:179)

Any idea what's causing this error?

Tomer Filiba

unread,
Feb 26, 2013, 2:56:44 AM2/26/13
to ag...@googlegroups.com
it seems that the stream has too few bytes. this could happen if the underlying socket has been closed, or if there's a bug in the protocol (at the sender's side), where it reports it sent X bytes but actually sent less. i have to admit i've abandoned agnos and i don't really plan to make any new releases or bugfixes, but i can help you diagnose the problem if you wish. 


it would be useful to add prints in the python side, of what's been sent, and the java side, of what's been received. there's already DebugFile ( https://github.com/tomerfiliba/agnos/blob/master/libagnos/python/src/agnos/transports.py#L39 ) which logs the transport to a file. 

an alternative would be to run wireshark and see exactly what's going on. 

btw, are you using multiple threads sharing the same connection? it's been known to cause some issues. 
are you sure the python side didn't crash? it would cause the socket to die... just pondering out loud here

-tomer


-----------------------------------------------------------------
    
Tomer Filiba 
tomerfiliba.com        




--
You received this message because you are subscribed to the Google Groups "agnos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agnos+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Josh D

unread,
Feb 26, 2013, 7:39:30 PM2/26/13
to ag...@googlegroups.com
Tomer, any help is appreciated.  Surprised this project didn't take off, but I suppose I only happened to bump into it because I've used construct and rpyc quite a bit.


> btw, are you using multiple threads sharing the same connection
We do have multiple threads, but access to the underlying connection is protected in critical sections.  I'm assuming you're implying that concurrent access to the connection via multiple threads is a problem.  In other words, there isn't an issue if different threads access the connection serially, right?

Yeah, the Python side is still up.  I basically package up the service and expose it through an API that my end users are using to develop test scripts.  I haven't yet been able to recreate the issue in my environment yet, but I'm working on it (with the debug information enabled you suggested).
Reply all
Reply to author
Forward
0 new messages