You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/06/21 13:45:00 UTC

[jira] [Work logged] (AMQ-8304) org.apache.activemq.transport.tcp.TcpTransport.run() attempts to read from closed stream

     [ https://issues.apache.org/jira/browse/AMQ-8304?focusedWorklogId=612629&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-612629 ]

ASF GitHub Bot logged work on AMQ-8304:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jun/21 13:44
            Start Date: 21/Jun/21 13:44
    Worklog Time Spent: 10m 
      Work Description: dvhvsekhar opened a new pull request #672:
URL: https://github.com/apache/activemq/pull/672


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 612629)
    Remaining Estimate: 0h
            Time Spent: 10m

> org.apache.activemq.transport.tcp.TcpTransport.run() attempts to read from closed stream
> ----------------------------------------------------------------------------------------
>
>                 Key: AMQ-8304
>                 URL: https://issues.apache.org/jira/browse/AMQ-8304
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.16.2
>            Reporter: Sekhar Durga
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Our problem is as follows:
> We have an application which stops broker on its exit using org.apache.activemq.broker.BrokerService.stop() call.
> The above stop call stops TransportConnection(s), and in the middle of stopping, org.apache.activemq.transport.tcp.TcpTransport.run() is attempting to read from  closed stream, which is causing following exceptions in our application logs:
> ================
> connectionErrorOccurred called with null
> javax.jms.JMSException: java.io.EOFException
> at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
> at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1960)
> at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1979)
> at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
> at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
> at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
> at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:114)
> at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:173)
> at org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:345)
> at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:96)
> at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:219)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.io.EOFException: null
> at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397)
> at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
> at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240)
> at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)
> at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
> ================
>  
> It seems we need to check for !isStopping() as well at following location:
> [https://github.com/apache/activemq/blob/activemq-5.16.x/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java#L214]
> It seems, we have done the same at [https://github.com/apache/activemq/blob/activemq-5.16.x/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java#L330]
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)