activemq-dev mailing list archives

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


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, 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 == -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 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$

> stomp+nio leaking file descriptor on client drop
> ------------------------------------------------
>                 Key: AMQ-2440
>                 URL:
>             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
> 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.
> " 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.

View raw message