#119 ConnectionHub can cause 100% CPU overrun

v1.0_(example)
closed-fixed
nobody
None
9
2011-05-29
2011-05-26
No

Maps in ConnectionHub are not synchronyzed. They can cause in certain case infinite loop !!!

You can see explenation here http://mailinator.blogspot.com/2009/06/beautiful-race-condition.html

Here is the stack trace of my program.

Stack trace:
java.util.HashMap.get(Unknown Source)
ca.uhn.hl7v2.app.ConnectionHub.updateRefs(ConnectionHub.java:181)
ca.uhn.hl7v2.app.ConnectionHub.incrementRefs(ConnectionHub.java:166)
ca.uhn.hl7v2.app.ConnectionHub.attach(ConnectionHub.java:97)
fr.aphm.integration.inim.manager.MessageManager.integrateMessage(MessageManager.java:123)
fr.aphm.integration.inim.manager.MessageManager.integrateMessages(MessageManager.java:195)
fr.aphm.integ.process.IntegrationProcess.doPost(IntegrationProcess.java:69)
fr.aphm.integ.process.IntegrationProcess.doGet(IntegrationProcess.java:90)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:450)
org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)
org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:371)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Regards

Stéphane

Discussion

  • stephane GINER

    stephane GINER - 2011-05-26
    • priority: 5 --> 9
     
  • James Agnew

    James Agnew - 2011-05-29
    • status: open --> closed-fixed
     
  • James Agnew

    James Agnew - 2011-05-29

    Thanks for figuring this out and reporting it Stephane. I've added a bunch of synchronization points to correct this and checked them in. They'll be incuded in the next release.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks