directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DIRMINA-81) race condition in SocketConnector::connect
Date Wed, 17 Aug 2005 01:41:55 GMT
     [ http://issues.apache.org/jira/browse/DIRMINA-81?page=all ]

Trustin Lee updated DIRMINA-81:
-------------------------------

    Fix Version: 0.7.4

> race condition in SocketConnector::connect
> ------------------------------------------
>
>          Key: DIRMINA-81
>          URL: http://issues.apache.org/jira/browse/DIRMINA-81
>      Project: Directory MINA
>         Type: Bug
>     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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message