java - What type of connections "RMI TCP Connection(idle)" threads correspond to? -


i'm working on distributed system rmi based using jdk1.6.

occasionally can see concurrentmodificationexception errors on thread happening within rmi runtime when fails serialize objects. can reproduce exception concurrently updating object being returned remote method.

but problem can't find source of calls. rmi exception written stderr (captured on server side within runtime code after exits remote object method), there no matching exception in client services (while if legitimate remote call, remoteexception appropriate cause raised).

the different thing exceptions happening on "rmi tcp connection(idle)" thread , not on thread "rmi tcp connection(<connection count>)-<client endpoint info>".

any clues on "idle" threads in rmi? failed find such within openjdk sources.

upd: i'm adding exception stack trace reproduced, see in described situation.

server side console shows:

exception dispatching call [-3534448f:12f54948b7f:-7fff, 349678755005857493] in thread "rmi tcp connection(6)-x.x.x.x" @ thu apr 14 16:15:13 bst 2011: java.util.concurrentmodificationexception     @ java.util.arraylist.writeobject(arraylist.java:573)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)     @ java.lang.reflect.method.invoke(method.java:597)     @ java.io.objectstreamclass.invokewriteobject(objectstreamclass.java:945)     @ java.io.objectoutputstream.writeserialdata(objectoutputstream.java:1469)     @ java.io.objectoutputstream.writeordinaryobject(objectoutputstream.java:1400)     @ java.io.objectoutputstream.writeobject0(objectoutputstream.java:1158)     @ java.io.objectoutputstream.writeobject(objectoutputstream.java:330)     @ sun.rmi.server.unicastref.marshalvalue(unicastref.java:274)     @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:315)     @ sun.rmi.transport.transport$1.run(transport.java:159)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.rmi.transport.transport.servicecall(transport.java:155)     @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:535)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:790)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:649)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662) 

client size exception thrown caller:

java.rmi.unmarshalexception: error unmarshalling return; nested exception is:     java.io.eofexception     @ sun.rmi.server.unicastref.invoke(unicastref.java:173)     @ java.rmi.server.remoteobjectinvocationhandler.invokeremotemethod(remoteobjectinvocationhandler.java:178)     @ java.rmi.server.remoteobjectinvocationhandler.invoke(remoteobjectinvocationhandler.java:132)     @ $proxy0.getdata(unknown source)     @ clnt.main(clnt.java:11)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)     @ java.lang.reflect.method.invoke(method.java:597)     @ com.intellij.rt.execution.application.appmain.main(appmain.java:115) caused by: java.io.eofexception     @ java.io.objectinputstream$blockdatainputstream.peekbyte(objectinputstream.java:2553)     @ java.io.objectinputstream.skipcustomdata(objectinputstream.java:1899)     @ java.io.objectinputstream.readserialdata(objectinputstream.java:1873)     @ java.io.objectinputstream.readordinaryobject(objectinputstream.java:1752)     @ java.io.objectinputstream.readobject0(objectinputstream.java:1328)     @ java.io.objectinputstream.readobject(objectinputstream.java:350)     @ sun.rmi.server.unicastref.unmarshalvalue(unicastref.java:306)     @ sun.rmi.server.unicastref.invoke(unicastref.java:155)     ... 9 more 

threads created in rmi's connection pool name 'rmi tcp connection(idle)'. when 1 of these used, runnable being used execute renames thread 'rmi tcp connection(n)' n connection number being handled (a sequential number), , renames 'idle' in runnable's block. trace labelled 'rmi tcp connection(idle)' must come before runnable renames connection thread, or after has been renamed back.

don't ask me how possible. actual answer problem, if not question, not modify objects while concurrently being returned ;-)


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -