Bug 1126000 - [GSS](6.4.0) HHH-9312 - Connection handle leak from hibernate afterCompletion method
Summary: [GSS](6.4.0) HHH-9312 - Connection handle leak from hibernate afterCompletion...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.0.0,6.1.1
Hardware: All
OS: All
unspecified
high
Target Milestone: DR11
: EAP 6.4.0
Assignee: Gail Badner
QA Contact: Martin Simka
URL:
Whiteboard:
Depends On:
Blocks: 1121629 1126959
TreeView+ depends on / blocked
 
Reported: 2014-08-01 14:45 UTC by Matthew Robson
Modified: 2019-08-19 12:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
1 instance of the leaked connection with ccm=true debug=true (308.53 KB, text/plain)
2014-08-01 14:45 UTC, Matthew Robson
no flags Details

Description Matthew Robson 2014-08-01 14:45:05 UTC
Created attachment 923329 [details]
1 instance of the leaked connection with ccm=true debug=true

Description of problem:

The hibernate afterCompletion method isn't closing the connection from the reaper thread and thus returns with a connection handle of 1.  IJ then does not return the connection during afterCompletion due to the non 0 connection handle and the connection is leaked.

Tested the theory using 'hibernate.jta.track_by_thread = false' which gives Hibernate the ability to close connections from the Reaper thread to prove the issue.  This, however, doesn't work as a solution due to concurrency issues.


Version-Release number of selected component (if applicable):

EAP 6.x & Hibernate 4.1.x / 4.2.x

How reproducible:

100%

Steps to Reproduce:

Note: These steps reflect the method by which this can be reproduced 100% of the time, not the real world scenario in which this occurs at random.

1. Thread outside the current transaction blocks for update on a row
2. Thread inside a transaction finds and updates the row which is blocked until the transaction times out.
3. With CCM, you see IJ000100, without, connection is leaked.

Actual results:

Connection is leaked from the pool permanently.

Expected results:

No connection leak.

Additional info:

Comment 4 Gail Badner 2014-11-21 03:00:45 UTC
Fixed for EAP 6.4.0.

Comment 5 Kabir Khan 2014-11-21 11:35:28 UTC
Fixed by Hibernate 4.2.16.Final upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1121629

Comment 6 Jan Martiska 2014-11-27 12:40:59 UTC
Verified in EAP 6.4.0.DR11 / Hibernate 4.2.16.Final-redhat-1.


Note You need to log in before you can comment on or make changes to this bug.