db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1326) Network server may abandon sessions when Derby system is shutdown and this causes intermittent hangs in the client
Date Thu, 14 Sep 2006 14:40:23 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1326?page=all ]

Knut Anders Hatlen updated DERBY-1326:
--------------------------------------

    Attachment: derby-1326-cleanup_exceptions.diff

Attaching a patch (derby-1326-cleanup_exceptions.diff) with two small
cleanups in preparation for the real fix (for which the approach
hasn't been chosen yet). None of the two cleanups will fix the hang.

Description of cleanup in DRDAConnThread.handleException(): When I was
stress testing one possible fix for the hang, I noticed a new type of
hang that I didn't understand. After a bit of investigation, I found
that the stress test triggered a NullPointerException while running
handleException(). handleException() is written so that all code paths
end with closeSession() and close(). However, if a runtime exception
is thrown, closeSession() and close() are skipped, and the
DRDAConnThread stops without closing the session (which leads to a
hang on the client). To fix this, I refactored handleException() so
that closeSession() and close() are called from a finally clause.

Description of cleanup in NetworkServerControlImpl.startNetworkServer():
Currently, the restart code closes and removes all sessions in
runQueue, but it leaves them in sessionTable as long as the network
server runs. Fix: Remove them from sessionTable as well. Also, a
synchronized block was added around the runQueue loop in case
addSession() or getNextSession() modifies the size of runQueue while
the loop is running.

I thought it would be better to get in these changes in advance to
make the real fix smaller and cleaner.

Derbyall ran cleanly with these changes.

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

        

Mime
View raw message