ActiveMQ
  1. ActiveMQ
  2. AMQ-2606

Unexpected error occured on TcpTransport caused by ArrayIndexOutOfBoundsException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: 5.x
    • Component/s: None
    • Labels:
      None

      Description

      Problem is basically a copy of AMQ-2605, but caused by different exception on TcpTransport.

      In setup with 2 brokers connected with ConduitBridge, we have a problem with network connector which is every couple of days disconnected because of ClassCastException on TcpTransport on other node.
      Network connector reconnects after some time (cca 1 min) by inactivity checker, but we have some minor message loss since we use syncSend=false on queues.

      15:18:37,771 DEBUG [Transport ] Transport failed: java.io.IOException: Unexpected error occured
      java.io.IOException: Unexpected error occured
      		at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:192)
      		at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ArrayIndexOutOfBoundsException
      15:18:37,772 DEBUG [TransportConnection ] Stopping connection: /192.168.0.2:36222
      15:18:37,829 DEBUG [TransportConnection ] Stopped transport: /192.168.0.2:36222
      15:18:37,829 DEBUG [TransportConnection ] Cleaning up connection resources: /192.168.0.2:36222
      

        Activity

        Hide
        Goran Pugar added a comment -

        Same scenario with disconnecting of NC happened after NegativeArraySizeException. Mine message loss happened also.

        Here is stack trace:

        09:48:26,116 DEBUG [Transport           ] Transport failed: java.io.IOException: Unexpected error occured
        java.io.IOException: Unexpected error occured
                at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:192)
                at java.lang.Thread.run(Thread.java:619)
        Caused by: java.lang.NegativeArraySizeException
                at org.apache.activemq.openwire.v5.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:81)
                at org.apache.activemq.openwire.v5.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66)
                at org.apache.activemq.openwire.v5.ActiveMQObjectMessageMarshaller.tightUnmarshal(ActiveMQObjectMessageMarshaller.java:66)
                at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:366)
                at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:279)
                at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210)
                at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202)
                at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
                ... 1 more
        
        Show
        Goran Pugar added a comment - Same scenario with disconnecting of NC happened after NegativeArraySizeException. Mine message loss happened also. Here is stack trace: 09:48:26,116 DEBUG [Transport ] Transport failed: java.io.IOException: Unexpected error occured java.io.IOException: Unexpected error occured at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:192) at java.lang. Thread .run( Thread .java:619) Caused by: java.lang.NegativeArraySizeException at org.apache.activemq.openwire.v5.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:81) at org.apache.activemq.openwire.v5.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66) at org.apache.activemq.openwire.v5.ActiveMQObjectMessageMarshaller.tightUnmarshal(ActiveMQObjectMessageMarshaller.java:66) at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:366) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:279) at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185) ... 1 more
        Hide
        Timothy Bish added a comment -

        Working as designed, exceptions on loss of connection due to incomplete openwire commands being read are acceptable. The static connection will reconnect once the connection is dropped.

        Show
        Timothy Bish added a comment - Working as designed, exceptions on loss of connection due to incomplete openwire commands being read are acceptable. The static connection will reconnect once the connection is dropped.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mario Lukica
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development