Issue Details (XML | Word | Printable)

Key: DIRMINA-123
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Trustin Lee
Reporter: Vinod Panicker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

Race condition in AbstractIoFilterChain

Created: 14/Nov/05 09:35 PM   Updated: 05/Dec/05 04:42 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

Resolution Date: 01/Dec/05 02:46 PM


 Description  « Hide
There is a race condition that occurs due to filter handling in AbstractIoFilterChain. The bug manifested itself when using the client side of the SSLFilter impl. In the register method below -

    private void register( Entry prevEntry, String name, IoFilter filter ) throws Exception
    {
        Entry newEntry = new Entry( prevEntry, prevEntry.nextEntry, name, filter );

        filter.init( this, newEntry.nextFilter );
        
        prevEntry.nextEntry.prevEntry = newEntry;
        prevEntry.nextEntry = newEntry;
        name2entry.put( name, newEntry );
        filter2entry.put( filter, newEntry );
    }

filter.init causes the ssl client HELLO to be sent to the server. If the client and server are on a fast network, the server response comes before the filter has been "put", causing it to be handed to the IoHandler.

Solution is to init the filter after putting it on the session.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order

Vinod Panicker added a comment - 05/Dec/05 04:42 PM
Checked. Working fine.