Bug 1019331

Summary: Possible database connection leak in org.rhq.enterprise.server.content.ContentManagerBean.writeBlobOutToStream
Product: [JBoss] JBoss Operations Network Reporter: Mike Foley <mfoley>
Component: DatabaseAssignee: Jirka Kremser <jkremser>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: jkremser
Target Milestone: ER04   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 20:43:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1012435    
Attachments:
Description Flags
possible db leak reported by FindBugs none

Description Mike Foley 2013-10-15 13:53:59 UTC
Created attachment 812542 [details]
possible db leak reported by FindBugs

Description of problem:  Findbugs static code analysis reports possible database connection leak in org.rhq.enterprise.server.content.ContentManagerBean.writeBlobOutToStream

line 2107 in ContentManagerBean


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


Note:  I am hunting possible database connection leaks in support of BZ

https://bugzilla.redhat.com/show_bug.cgi?id=1018233  

(OOM with JON 3.2 ... initial developer heap analysis from that issue shows possible connection leak. so here is 1 possible leak to investigate)

Comment 1 Jirka Kremser 2013-10-15 14:42:56 UTC
This is a DB connection leak, but the method is being called only from the test environment (itests-2) so it shouldn't be (unfortunately) related to bug 1018233.


branch:  release#jon3.2.x
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=80359d799
time:    2013-10-15 16:42:16 +0200
commit:  80359d7992b0a46dc0b8adcf6f42c2b551b8966f
author:  Jirka Kremser - jkremser
message: [BZ 1019331] - Possible database connection leak in
         org.rhq.enterprise.server.content.ContentManagerBean.writeBlobOutToStream
         - closing the resultset, prepare statement and connection
         properly in the finally block.

Comment 2 Simeon Pinder 2013-10-24 04:09:25 UTC
Moving to ON_QA for testing in the next build.