Bug #1449
ProtocolViolation error
0%
History
#1 Updated by Constantin Asofiei almost 12 years ago
A testcase scenario was built to try and duplicate #1439, where 10 clients were left to run for a long time. Each client did something like: create a number of xml files, test if the xml files are valid, and if valid delete all files and start again, in an infinite loop. After ~5 days, 2 clients had restarted (with no info logged in the clients' logs) while in the server.log the following stacktrace was found:
Caused by: com.goldencode.p2j.net.ProtocolViolation: Expected ID 754583505 but rec'd ID 754583504 at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:260) at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1107) at com.goldencode.p2j.net.Queue.transact(Queue.java:575) at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:177) at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:163) at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invoke(RemoteObject.java:685) at $Proxy3.endOutput(Unknown Source) at com.goldencode.p2j.util.RemoteStream.endOutput(RemoteStream.java:565) at com.goldencode.p2j.util.StreamWrapper.endOutput(StreamWrapper.java:349) at com.goldencode.p2j.util.Stream.endOutput(Stream.java:2130) at com.goldencode.p2j.util.Stream.finished(Stream.java:4277) at com.goldencode.p2j.util.TransactionManager.processFinalizables(TransactionManager.java:4628) at com.goldencode.p2j.util.TransactionManager.popScope(TransactionManager.java:2069) at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:6946) at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:194) at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:180)
#2 Updated by Greg Shah almost 12 years ago
Can you attach a more specific recreate (the specific programs you used and instructions for running the test)?
#3 Updated by Constantin Asofiei almost 12 years ago
- File ca_test20120725a.zip added
- unpack the archive and rebuild P2J
- change your directory's p2j-entry to com.goldencode.testcases.CoaRun.execute
- start i.e. 10 clients (when prompted, enter an unique ID for each client session, i.e. from 0 to 9)
- leave them running until you encounter the ProtocolViolation error (each time I ran this scenario, it took days to see this error)
It might be possible to tweak the P2J sources to generate a memory dump when a ProtocolViolation error encountered (on both server and client side), but I didn't spend time investigating how to do this. A mem dump might help us see what is the state of the Control and other net protocol classes at the time of the error.
Another way to increase the probability of this error would be to spend some time investigating how to produce this error with less code and clients.