You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2009/05/26 02:47:45 UTC
[jira] Closed: (DIRMINA-81) race condition in
SocketConnector::connect
[ https://issues.apache.org/jira/browse/DIRMINA-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny closed DIRMINA-81.
------------------------------------
> race condition in SocketConnector::connect
> ------------------------------------------
>
> Key: DIRMINA-81
> URL: https://issues.apache.org/jira/browse/DIRMINA-81
> Project: MINA
> Issue Type: Bug
> Affects Versions: 0.7.3
> Reporter: Rodrigo Kumpera
> Assignee: Trustin Lee
> Fix For: 0.7.4
>
>
> The problem happens in the connect method when the selector is waken up. The following scenario will show the error:
> main-thread:
> -acquire "this" monitor
> -acquire "connectQueue" monitor
> -push the new request
> -release "connectQueue" monitor
> -call startupWorker() -> this will create the Selector and the Worker thread
> -release "this" monitor
> worker thread:
> -process the required connect request
> -acquire "SocketConnector.this" monitor
> -close the selector and assign null
> -thread dies
> main thread:
> -tries to call selector.wakeup() and get a NullPointerException
> This problem can be reproduced easily with the help of a debugger, put a breakpoint on "selector.wakeup()" and wait for the Worker thread to die.
> It seens that SocketConnector wan´t made with the purpoise of handling a lot of connect() calls, but more like a single shot thing. It should behave more like a Service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.