Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5768

UIMA-AS: fix race condition leading to NPE while recovering from lost connection to broker

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 3.0.0AS
    • Async Scaleout
    • None

    Description

      When UIMA-AS client looses broker connection it goes into a retry mode trying to reconnect. In one particular case the NPE was thrown :

      7| | javax.jms.JMSException: java.io.EOFException
      7| | at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
      7| | at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1948)
      7| | at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1967)
      7| | at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
      7| | at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
      7| | at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
      7| | at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
      7| | at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:173)
      7| | at org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:345)
      7| | at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:96)
      7| | at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:219)
      7| | at java.lang.Thread.run(Thread.java:811)
      7| | Caused by: java.io.EOFException
      7| | at java.io.DataInputStream.readFully(DataInputStream.java:208)
      7| | at java.io.DataInputStream.readInt(DataInputStream.java:398)
      7| | at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
      7| | at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240)
      7| | at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)
      7| | at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
      7| | ... 1 more
      7| | java.lang.NullPointerException
      7| | at org.apache.uima.adapter.jms.client.ActiveMQMessageSender.createSession(ActiveMQMessageSender.java:109)
      7| | at org.apache.uima.adapter.jms.client.ActiveMQMessageSender.initializeProducer(ActiveMQMessageSender.java:144)
      7| | at org.apache.uima.adapter.jms.client.ActiveMQMessageSender.getMessageProducer(ActiveMQMessageSender.java:164)
      7| | at org.apache.uima.adapter.jms.client.BaseMessageSender.run(BaseMessageSender.java:286)
      7| | at java.lang.Thread.run(Thread.java:811)

      Looks like the above is caused by some race condition. One thread trying to reconnect while another trying to use a connection handle which had been invalidated. 

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik

            Dates

              Created:
              Updated:

              Slack

                Issue deployment