Bug 1034044 - Reference of MANIFEST.MF file which is under tmp directory remains
Summary: Reference of MANIFEST.MF file which is under tmp directory remains
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: VFS
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Enrique Gonzalez Martinez
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-25 07:13 UTC by Eiichi Nagai
Modified: 2018-12-03 20:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-06 10:44:58 UTC
Type: Bug


Attachments (Terms of Use)

Description Eiichi Nagai 2013-11-25 07:13:10 UTC
Description of problem:
When EAP starts, reference of MANIFEST.MF file which is under tmp directory remains in JVM. It will be cleared by GC. However, if EAP shut down before GC, it is not deleted from tmp file.

Version-Release number of selected component (if applicable):
EAP 6.2 Beta
Windows

How reproducible:
Always in windows environment

Steps to Reproduce:
1. Run EAP 6 server in windows environment.
2. Deploy a ejb-in-ear which is EAP 6 quickstart application.
3. Shutdown EAP 6 server.
4. You can confirm that MANIFEST.MF file remains under the tmp file.
ex)
standalone
  `-- tmp
       `-- vfs
             `-- deployment
                  `-- deploymentc1e1858a72ea8d31
                       `-- jboss-ejb-in-ear-web.war-6cc33f11c748d380
                            `-- META-INF
                                 `-- MANIFEST.MF

Additional info:
Its MANIFEST.MF InputStream is read/closed using readManifest() method in VFSUtils class. However, its InputStream is PaddedManifestStream[2]. I think it has to close a realStream object in PaddedManifestStream too when PaddedManifestStream is closed.

[1] org.jboss.vfs.VFSUtils.java
218#    public static Manifest readManifest(VirtualFile manifest) throws IOException {
219#        if (manifest == null) {
220#            throw MESSAGES.nullArgument("manifest file");
221#        }
222#        InputStream stream = new PaddedManifestStream(manifest.openStream());
223#        try {
224#            return new Manifest(stream);
225#        } finally {
-> 226#            safeClose(stream);
227#        }
228#    }

[2] org.jboss.vfs.util.PaddedManifestStream.java
32# public class PaddedManifestStream extends InputStream {
33#
-> 34#    private final InputStream realStream;
35#    private int previousChar = -1;
36#
37#    public PaddedManifestStream(InputStream realStream) {
38#        this.realStream = realStream;
39#    }

Comment 1 Enrique Gonzalez Martinez 2015-05-06 10:44:58 UTC
checked in jboss eap 6.2.0 and jboss-vfs 3.2.2.Final-redhat-1. The problem can be reproduced.
I cannot reproduce the problem with the current jboss-vfs version in jboss eap 6.4.0.

This is already fixed.

Commit can be found here:
https://github.com/jbossas/jboss-vfs/commit/486e5cb9dbf6efeabd45f8b64b4a8a66d67d375a

The patch was merged in jboss-vfs 3.2.4

https://github.com/jbossas/jboss-vfs/compare/3.2.2.Final...3.2.4.Final
(there is no 3.2.3.Final)

jboss-eap 6.3.0+ depends on jboss-vfs 3.2.5+

I'm closing this as works for me.


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