Bug 724740 (BRMS-594) - Open file leak in Drools Compiler
Summary: Open file leak in Drools Compiler
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-594
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: BRMS 5.2.0.GA
Assignee: Tihomir Surdilovic
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-19 16:21 UTC by Matt Davis
Modified: 2011-10-10 03:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
<remark>Needinfo From MattD: please state how this issue was resolved.</remark></para><para>When input streams were opened by the isPackage() method in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.
Clone Of:
Environment:
Last Closed: 2011-05-26 20:18:27 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-594 0 Major Closed Open file leak in Drools Compiler 2013-05-07 15:01:20 UTC
Red Hat Issue Tracker SOA-3081 0 Major Closed Need BRMS-594 included in SOA Platform 2013-05-07 15:01:24 UTC

Description Matt Davis 2011-05-19 16:21:03 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000007AQwS&sfdc.override=1
securitylevel_name: Public

Need fix for JBRULES-2928 in BRMS :

I am running Drools (actually JBoss Rules 5.1.0 ) in Glassfish.

My deployable is an EJB that uses a StatelessKnowledgeSession to run
some rules that I get from a KnowledgeAgent that has a Changeset with a
.drl in it.
Therefore, I have placed the drools compiler into the deployable and it
all appears to work.

Glassfish has a clever little mechanism that, when you unload a
deployable that had some open streams, it tells you all about it (and
kindly closes them).

Glassfish is reporting that InputStreams are being left open that were
opened in the isPackage() method of
org.drools.commons.jci.compilers.EclipseJavaCompiler.
That method has the following code in it:-

final InputStream is =
pClassLoader.getResourceAsStream(ClassUtils.convertClassToResourcePath(pClazzName));
if (is != null) { return false; }

So, when "is" is not null (i.e. open), it is forgotten about and not closed.

Isn't this a potential file handle leak?

Comment 1 Matt Davis 2011-05-19 16:22:07 UTC
Link: Added: This issue Cloned from JBRULES-2928


Comment 2 Matt Davis 2011-05-19 16:25:10 UTC
Link: Added: This issue Cloned to SOA-3081


Comment 3 lcarlon 2011-08-25 00:54:58 UTC
Please provide Cause, Consequence, Fix, and Result[1] for the release notes.


[1]https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Comment 4 lcarlon 2011-09-20 05:34:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
<remark>Needinfo</remark>

Comment 5 lcarlon 2011-09-20 05:59:37 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-<remark>Needinfo</remark>+<remark>Needinfo</remark></para><para>When input streams were opened by the isPackage() method of in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.

Comment 6 lcarlon 2011-09-20 06:20:59 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-<remark>Needinfo</remark></para><para>When input streams were opened by the isPackage() method of in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.+<remark>Needinfo From MattD: please state how this issue was resolved.</remark></para><para>When input streams were opened by the isPackage() method of in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.

Comment 7 lcarlon 2011-09-20 06:21:56 UTC
Sorry for the constant updates - part of the release notes process is being automated and this is the lucky bug I'm testing with.

Comment 8 lcarlon 2011-10-10 03:31:23 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-<remark>Needinfo From MattD: please state how this issue was resolved.</remark></para><para>When input streams were opened by the isPackage() method of in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.+<remark>Needinfo From MattD: please state how this issue was resolved.</remark></para><para>When input streams were opened by the isPackage() method in the org.drools.commons.jci.compilers.EclipseJavaCompiler class some input streams were not being closed.


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