[ 
http://issues.apache.org/jira/browse/DERBY-1326?page=comments#action_12434985 ] 
            
Knut Anders Hatlen commented on DERBY-1326:
-------------------------------------------

Deepa wrote:
> I still cannot wrap my head around old sessions hanging around in the server.

They hang around in the server because the DRDAConnThread could be blocked in a 
read() call. read() will block until the socket stream is closed (either by the 
client or the server) or the client sends data. Calling close() on the 
DRDAConnThread only sets a flag, so this won't interrupt read(). I think Bryan 
was very close to solving this when he went through sessionTable and closed 
each session (which will take down the socket stream and make read() return -1 
immediately). See one of his earlier comments about this. I don't think that 
issue is directly related to the hang or abandoning of sessions, so it should 
probably be filed as a separate issue.

> Network server may abandon sessions when Derby system is shutdown and this 
> causes intermittent hangs in the client
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1326
>                 URL: http://issues.apache.org/jira/browse/DERBY-1326
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>            Reporter: Deepa Remesh
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-1326-cleanup_exceptions.diff, 
> derby-1326-skipThreads.diff, repro1326.java, 
> resolve_DRDConnThread_conflict.diff, Restart.java, sessionMgmt1.diff, 
> sessionMgmt1_and_nosessionsforclosedthreads.diff, 
> unify_NSImpl_instances.diff, withNewThreadAndNoShutdownOfCurrentSession.diff
>
>
> This issue was found when working on DERBY-1219. More details can be found in 
> the comments at http://issues.apache.org/jira/browse/DERBY-1219

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