[ 
https://issues.apache.org/jira/browse/DERBY-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726172#action_12726172
 ] 

Mamta A. Satoor commented on DERBY-4053:
----------------------------------------

Wanted to post some progress on this issue
1)First of all, I don't need to run the entire suite anymore to run into hang 
problem. Just running the jdbc4 suite is enough to repro the problem. that is 
saving tons of time with reproducing the bug on my machine when running with 
10.5 server jars and 10.4 client jars
2)jdbc4 suite is consistently hanging in jdbc4.ConnectionMethodsTest
3)The problem is not really with the test that is hung, rather it is the 
previous test jdbc4.UnsupportedVetter
4)After lonts and lots of printlns in the network server code, it appears the 
problem might be that XA connections may not be cleaning up properly and hence 
the server can't shutdown successfully. But ofcourse as this jira shows, we do 
not handle that case properly. This leads into server not getting shutdown when 
the junit test is expecting it to be shutdown. The next test when it tries to 
bring the server up can't do that successfully.

The next step is to come up with a XA test case to repro the improper cleanup 
of XA connection.

Following is the stack trace that I have added into my codeline showing XA 
connection not closing properly

java.sql.SQLException: Cannot close a connection while a transaction is still 
active.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:103)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:167)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.newSQLExceptionEmbedConnection.java:2948)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(EmbedConnection.java:1806)
        at 
org.apache.derby.jdbc.EmbedPooledConnection.checkCloseEmbedPooledConnection.java:459)
        at 
org.apache.derby.jdbc.EmbedXAConnection.checkCloseEmbedXAConnection.java:152)
        at 
org.apache.derby.iapi.jdbc.BrokeredConnection.close(BrokeredConnection.java:169)
        at org.apache.derby.impl.drda.Database.close(Database.java:362)
        at org.apache.derby.impl.drda.Session.close(Session.java:115)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:838)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at 
org.apache.derby.iapi.jdbc.DRDAServerStarter.run(DRDAServerStarter.java:236)
        at java.lang.Thread.run(Thread.java:735)
Caused by: java.sql.SQLException: Cannot close a connection while a transaction 
is still active.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:73)
        ... 16 more

> suites.All hang with message java.net.BindException: Address already in use: 
> NET_Bind in derby.log 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4053
>                 URL: https://issues.apache.org/jira/browse/DERBY-4053
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server, Test
>    Affects Versions: 10.5.1.1
>            Reporter: Kathey Marsden
>         Attachments: derby-4053_repro_dont_commit_diff.txt, derby.log, 
> javacore-20090420-1735.txt, javacore.20090211.123031.4000.0001.txt, 
> suites.All.out
>
>
> Running suites.All with IBM 1.5  on 10.5.0.0 alpha - (743198)  I got a hang 
> in the test run.  The last test to run successfully was 
> xtestNestedSavepoints, but I am not sure exactly what test caused  the hang.  
> I took a thread dump which I will attach, which showed network server up and 
> running but no ClientThread and a ping attempt blocked.
> This hang is very similar to the hang that was seen after the fix attempts 
> for DERBY-1465 but that change was backed out so it is not related to that 
> change.   It could be that the change for DERBY-1465 just made this highly 
> intermittent problem more likely.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to