directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee (JIRA)" <>
Subject [jira] Resolved: (DIRMINA-81) race condition in SocketConnector::connect
Date Wed, 17 Aug 2005 01:59:54 GMT
     [ ]
Trustin Lee resolved DIRMINA-81:

    Resolution: Fixed

I checked in the fix.  It should work fine now.

If you want to connect to a lot of endpoint at the same time, I suggest you to try MINA 0.9-SNAPSHOT.
 You can send connection requests asynchronously.

> race condition in SocketConnector::connect
> ------------------------------------------
>          Key: DIRMINA-81
>          URL:
>      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:
For more information on JIRA, see:

View raw message