activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danilo Tuler (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-2440) stomp+nio leaking file descriptor on client drop
Date Mon, 05 Oct 2009 21:18:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-2440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Danilo Tuler updated AMQ-2440:
------------------------------

    Attachment: AMQ-2440-1.txt

This is my first shot at fixing it.

Some of the issues I found:

1) SelectorWorker calls Selector.open(), but the selector is never ever closed. I'm closing
at SelectorManager.onWorkerEmptyEvent. Not sure if that's the correct spot.

2) StompNIOTransport.serviceRead was not calling selection.close on IOException. NIOTransport
does call selection.close on channel.read == -1 but not on IOException.

3) DataInputStream not being closed at StompNIOTransport.serviceRead

I'm still getting some side effects. The exception below happened once on a client disconnect.
Seems like a race condition at SelectorWorker.

Exception in thread "NIO Transport Thread" java.nio.channels.ClosedSelectorException
	at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)
	at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
	at org.apache.activemq.transport.nio.SelectorWorker.run(SelectorWorker.java:76)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)


> stomp+nio leaking file descriptor on client drop
> ------------------------------------------------
>
>                 Key: AMQ-2440
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2440
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.3.0
>         Environment: Windows XP
>            Reporter: Danilo Tuler
>         Attachments: AMQ-2440-1.txt
>
>
> The bug is observed on code checkout from https://svn.apache.org/repos/asf/activemq/tags/activemq-5.3.0
> A server is initiated with stomp+nio transport on port 61612.
> A client connects. A SelectorWorker is created on SelectorManager:68.
> If the client drops the connection an exception is received at StompNIOTransport:91.
> "java.io.IOException: An existing connection was forcibly closed by the remote host".
> But selector are not cleaned up. It works with stomp transport. But not with stomp+nio.
> What I see in the end is an increasing number of "connections" if the JVM.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message