db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <a...@golux.com>
Subject [PATCH] DB Shutdown fix for Network Server
Date Tue, 23 Nov 2004 22:41:03 GMT
It appears that Derby Network Server has an intermittent problem where a hang can occur if
several connections exist to 
a single database and then a new connection comes in and shuts down that database.  It's pretty
hard to reproduce the 
problem, but it can happen now and again.

Kathey M and I were looking at this problem together and discovered that, when a DRDA connection
thread is interrupted, 
the "freeThreads" variable inside DB2jServerImpl.java doesn't get updated correctly.  This
makes it so that the number 
of free threads that the server _thinks_ it has is greater than the number that is actually
available.  The result is 
that, at some point, the server will try to assign a "free" server thread to handle some new
connection, but since there 
aren't any free threads, the connection waits indefinitely to be picked up, leading to a hang.

That said, I am proposing the following patch to fix the problem.

I ran the derbynetmats suite (which is available as part of the Derby codeline) with these
changes, and all of the tests 
passed.

Please review and submit, when possible.

Thanks,
Army

Mime
View raw message