activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-6004) TcpTransportServer#socketHandlerThread should be intterrupted to stop the socket handler (daemon) thread
Date Wed, 18 Nov 2015 16:22:11 GMT

    [ https://issues.apache.org/jira/browse/AMQ-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011305#comment-15011305
] 

ASF subversion and git services commented on AMQ-6004:
------------------------------------------------------

Commit 15412bae64bf265687b1099e19cba008bac9c825 in activemq's branch refs/heads/master from
[~gtully]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=15412ba ]

AMQ4221Test - remove system exit as it breaks surefire fork, https://issues.apache.org/jira/browse/AMQ-6004
interrupt causes errors on shutdown. Two are sorted but the check for errors in the logs may
still cause intermittent failures


> TcpTransportServer#socketHandlerThread should be intterrupted to stop the socket handler
(daemon) thread
> --------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-6004
>                 URL: https://issues.apache.org/jira/browse/AMQ-6004
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.12.0
>            Reporter: Erik Godding Boye
>            Assignee: Christopher L. Shannon
>             Fix For: 5.12.1, 5.13.0
>
>         Attachments: Interrupt_socket_handler_thread_to_stop_daemon_thread.patch
>
>
> I am trying to achieve a clean shutdown of an embedded broker in a web application running
in Tomcat. When the web application is shut down, Tomcat is always complaining about a running
thread:
> {code}
> 09:09:55.948 WARN  [o.a.c.loader.WebappClassLoaderBase] [] The web application [xxx]
appears to have started a thread named [ActiveMQ Transport Server Thread Handler: tcp://0.0.0.0:12345]
but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
>  sun.misc.Unsafe.park(Native Method)
>  java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
>  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown
Source)
>  java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
>  org.apache.activemq.transport.tcp.TcpTransportServer$2.run(TcpTransportServer.java:427)
>  java.lang.Thread.run(Unknown Source)
> {code}
> I am pretty sure this can be easily fixed by interrupting the socket handler thread,
as suggested by Andreas Hartmann in [AMQ-3451|https://issues.apache.org/jira/browse/AMQ-3451?focusedCommentId=13170863&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13170863].
Please see attached patch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message