db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-3379) "No Current connection" on PooledConnection.getConnection() if pooled connection is reused during connectionClosed processing
Date Mon, 31 Mar 2008 09:52:24 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Waagan resolved DERBY-3379.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.5.0.0
                   10.4.1.0
       Derby Info:   (was: [Patch Available])

Committed 'derby-3379-3a-minimal_fix_and_test_enabling.diff'  to trunk with revision 642942
and merged it to the 10.4 branch with revision 642944.

It turned out that the deleted method 'cacheConnectBytes' changed the state in the request
object, which caused the hang. The reason for the state change was that it needed the correct
offsets to copy the raw connect bytes, and it obtained these offsets by finalizing the DSS.
The chaining bits were set as part of this, but when there are no more commands to send, the
server will hang waiting for the next command and the client will hang waiting for the reply
to the first (and only) command. The bug will not be triggered if the statement being closed
has open result sets, as that will cause another command to be written to the chain and the
chaining bits are set correctly in this case.

I'm of the opinion that the patch makes the driver behave more correctly, and therefore I
proceeded with committing patch 3a.

For reference, here is the stack trace for the client during the hang. The server stack trace
doesn't show anything useful for this bug.
"main" prio=10 tid=0x08070000 nid=0x2 runnable [0xfe4fe000..0xfe4fed48]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at org.apache.derby.client.net.Reply.fill(Reply.java:174)
        at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Reply.java:215)
        at org.apache.derby.client.net.Reply.readDssHeader(Reply.java:317)
        at org.apache.derby.client.net.Reply.startSameIdChainParse(Reply.java:1147)
        at org.apache.derby.client.net.NetConnectionReply.readExchangeServerAttributes(NetConnectionReply.java:54)
        at org.apache.derby.client.net.NetConnection.readServerAttributesAndKeyExchange(NetConnection.java:862)
        at org.apache.derby.client.net.NetConnection.readAllConnectCommandsChained(NetConnection.java:832)
        at org.apache.derby.client.net.NetConnection.readDeferredReset(NetConnection.java:994)
        at org.apache.derby.client.net.NetAgent.readDeferredResetConnection(NetAgent.java:474)
        at org.apache.derby.client.net.NetAgent.beginReadChainOutsideUOW(NetAgent.java:490)
        at org.apache.derby.client.am.Agent.flowOutsideUOW(Agent.java:197)
        at org.apache.derby.client.am.Statement.flowCloseOutsideUOW(Statement.java:1686)
        at org.apache.derby.client.am.Statement.closeX(Statement.java:604)
        at org.apache.derby.client.am.Statement.close(Statement.java:564)
        - locked <0xf4157648> (a org.apache.derby.client.net.NetConnection40)
        at d3379.main(d3379.java:30)


> "No Current connection" on PooledConnection.getConnection() if pooled connection is reused
during connectionClosed processing
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3379
>                 URL: https://issues.apache.org/jira/browse/DERBY-3379
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0,
10.3.1.4, 10.3.2.1
>            Reporter: Kathey Marsden
>            Assignee: Kristian Waagan
>             Fix For: 10.4.1.0, 10.5.0.0
>
>         Attachments: derby-3379-1a-enforce_no_chaining.diff, derby-3379-1a-enforce_no_chaining.diff,
derby-3379-1a-enforce_no_chaining.stat, derby-3379-1a-enforce_no_chaining.stat, derby-3379-1b-enforce_no_chaining.diff,
derby-3379-1c-enforce_no_chaining.diff, derby-3379-1c-enforce_no_chaining.stat, derby-3379-2a-comment_and_JavaDoc.diff,
derby-3379-3a-minimal_fix_and_test_enabling.diff
>
>
> This is the client version of bug DERBY-2142.  It can be reproduced by enabling the test,
DataSourceTest.testPooledReuseOnClose() for client. I am opening a new issue for client as
the embedded fix was backported to 10.1 and I am guessing the client fix won't be backported
that far.  Better to keep it as  a separate issue.
>  

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


Mime
View raw message