[ 
http://issues.apache.org/jira/browse/DERBY-1219?page=comments#action_12378228 ] 

Bryan Pendleton commented on DERBY-1219:
----------------------------------------

Hi Deepa. Thank you for the good notes. As you say:

> The test hangs intermittently and the place where the test hangs is in one of 
> the getConnection
>   methods. The hang location varies in different runs but is always in the 
> getConnection method. 
>   I can repro it quite easily

I appear to be able to reproduce it quite easily, too. So that is good.

I think that an interesting aspect of this test is that it creates and tears 
down a lot of connections
in very rapid succession, and I am wondering whether there is a race condition 
somewhere
that is causing the code to lose track of which connection is which.

I think that your analysis of the (actualBytesRead == -1) case is good, but is 
perhaps a red
herring. I believe that this is the normal way that the server cleans up when a 
client
connection disconnects and goes away. So I don't think this is *directly* the 
place where things
are going wrong; it's just evidence that the server is seeing a lot of 
connections come and go.

It seems like, at least in the cases I've seen so far, the bottom line is this:
 - the client believes it's initiated a new connection with the server
 - the server, however, has no record of that connection, and believes it's 
cleaned up all
   its connections and is idle

So I think something is going wrong in the connection management code on one 
side or
the other.

Thanks for the great test case and set of notes; I'll continue to study this 
one some more and
let you know if I figure anything out.


> jdbcapi/checkDataSource.java and jdbcapi/checkDataSource30.java hang 
> intermittently with client
> -----------------------------------------------------------------------------------------------
>
>          Key: DERBY-1219
>          URL: http://issues.apache.org/jira/browse/DERBY-1219
>      Project: Derby
>         Type: Test

>   Components: Network Server, Network Client
>     Versions: 10.2.0.0
>  Environment: More often on jdk 1.5 or jdk 1.6 but hangs on jdk 1.4.2 as well
>     Reporter: Kathey Marsden
>     Priority: Minor
>  Attachments: client_stack_trace_050306.txt, drda_traces_050206.zip, 
> server_stack_trace_050306.txt, testfiles_afterhang.zip, traces_on_hang.txt
>
> The tests checkDataSource.java and checkDataSource30.java 
> hang intermittently especially with jdk 1.5.
> Attached is the test run output and traces when the server is started 
> separately.
> 1) Enable checkDataSource30.java by taking it out of 
> functionTests/suites/DerbyNetClient.exclude.
> 2) Run the test with client.
> java -Dij.exceptionTrace=true -Dkeepfiles=true -Dframework=DerbyNetClient 
> org.apache.derbyTesting.functionTests.harness.RunTest 
> jdbcapi/checkDataSource30.java
> Attachements:
>  testfiles_after_hang.zip - Test directory.
>  traces_on_hang.txt  - Server side traces obtained by starting the server 
> separately before running the test.
> I wish I had time to work on this right now as I would really like to see 
> this valuable test in the suite, but hopefully someone else will pick it up.

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