[ 
http://issues.apache.org/jira/browse/DIRMINA-181?page=comments#action_12370044 
] 

Trustin Lee commented on DIRMINA-181:
-------------------------------------

I cannot reproduce this bug easily because it depends on timing.  However, I 
found a possible scenario:

1. A session is closed by remote peer.

This causes session.isConnected() return false but session.isClosing() return 
false, too.  If  a session is closed, then session.isClosing should be true by 
its definition.

2. session.close() is invoked by a handler.

Calling close() on disconnected session must not propagate the request to the 
filter chain.  BaseIoSession.close() prevents propagation using session.closing 
property, but it is still false due to the problem happened in step #1.

To fix this, session.isClosing() should return true when the session is closed 
due to remote peer disconnection.

> Failure to shutdown SSL in a test run
> -------------------------------------
>
>          Key: DIRMINA-181
>          URL: http://issues.apache.org/jira/browse/DIRMINA-181
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9.3
>  Environment: Java 5, Mac OS X 10.4.5, running tests in IDEA 5.1
>     Reporter: peter royal
>     Priority: Minor

>
> I have been unable to reproduce it.. I don't know what test it was from 
> either.. Perhaps it represents a race condition somewhere, dunno.. Just 
> throwing in here so it doesn't get forgotten.
> java.lang.IllegalStateException
>       at 
> org.apache.mina.filter.SSLFilter.getSSLSessionHandler(SSLFilter.java:632)
>       at org.apache.mina.filter.SSLFilter.isSSLStarted(SSLFilter.java:188)
>       at org.apache.mina.filter.SSLFilter.filterClose(SSLFilter.java:538)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterClose(AbstractIoFilterChain.java:576)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:52)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterClose(AbstractIoFilterChain.java:779)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$2.filterClose(AbstractIoFilterChain.java:218)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterClose(AbstractIoFilterChain.java:576)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.filterClose(AbstractIoFilterChain.java:567)
>       at 
> org.apache.mina.transport.socket.nio.support.SocketSessionImpl.close0(SocketSessionImpl.java:150)
>       at 
> org.apache.mina.common.support.BaseIoSession.close(BaseIoSession.java:107)
>       at 
> org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate.unbind(SocketAcceptorDelegate.java:261)
>       at 
> org.apache.mina.common.support.DelegatedIoAcceptor.unbind(DelegatedIoAcceptor.java:70)
>       at 
> org.apache.mina.examples.echoserver.AbstractTest.tearDown(AbstractTest.java:191)
>       at junit.framework.TestCase.runBare(TestCase.java:130)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at junit.textui.TestRunner.doRun(TestRunner.java:116)
>       at 
> com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
>       at junit.textui.TestRunner.start(TestRunner.java:172)
>       at 
> com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
>       at 
> com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:98)
>       at 
> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)

-- 
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

Reply via email to