[jboss-jira] [JBoss JIRA] Commented: (JBAS-7728) IterableTimedVFSCache leaks disk space when cache values get expired

Ari Savolainen (JIRA) jira-events at lists.jboss.org
Mon Feb 22 01:31:10 EST 2010


    [ https://jira.jboss.org/jira/browse/JBAS-7728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12515626#action_12515626 ] 

Ari Savolainen commented on JBAS-7728:
--------------------------------------

The remaining issue seems to be concurrency related. The VFS_2.2 snapshot didn't help.

With the help of a debugger I did the following

1) List periodically wars in vfs-nested.tmp (the number of them tells, how many times the ear is unpackaged)
2) Dump all threads when the ear is to be unpackaged (ZipEntryContext.initEntries())

Here is a fragment from the log where the number of wars was increased:

1) At first there are 4 wars (interestingly, right after deployment there were three)

Timer, Fri Feb 19 21:30:01 EET 2010, 1266607801397, 4 wars
a636ff8d_company-product-war.war
2891970f_company-product-war.war
066ce730_company-product-war.war
44ae91f6_company-product-war.war

2) Here thread http-0.0.0.0-8080-1 is unpackaging the ear, thread http-0.0.0.0-8080-20 is getting there

/home/user/devel/company/product-trunk/ear/target/company-product-ear-1.0-SNAPSHOT.ear
ZipEntryContext.initEntries, Fri Feb 19 21:30:04 EET 2010, 1266607804988, 3 wars
a636ff8d_company-product-war.war
2891970f_company-product-war.war
44ae91f6_company-product-war.war
"http-0.0.0.0-8080-20" RUNNING
	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
	at java.io.File.isFile(File.java:778)
	at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:300)
	at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:251)
	at org.jboss.virtual.plugins.context.file.FileSystemContext.getRoot(FileSystemContext.java:220)
	at org.jboss.virtual.VFS.getRoot(VFS.java:339)
	at org.jboss.virtual.VFS.createNewRoot(VFS.java:229)
	at org.jboss.virtual.VFS.getRoot(VFS.java:244)
	at org.jboss.virtual.VFS.getRoot(VFS.java:313)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:105)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getVirtualFile(VirtualFileURLConnection.java:118)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:93)
	at java.net.URL.openStream(URL.java:1010)
	at org.jboss.seam.deployment.SeamDeploymentProperties.addPropertiesFromResourceBundle(SeamDeploymentProperties.java:64)
"http-0.0.0.0-8080-1" RUNNING
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:477)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:629)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:786)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:830)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195)
	at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169)
	at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
	at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:468)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:106)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getVirtualFile(VirtualFileURLConnection.java:118)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:93)
	at java.net.URL.openStream(URL.java:1010)
	at org.jboss.seam.deployment.SeamDeploymentProperties.addPropertiesFromResourceBundle(SeamDeploymentProperties.java:64)

3) Here both the threads are unpackaging

/home/user/devel/company/product-trunk/ear/target/company-product-ear-1.0-SNAPSHOT.ear
ZipEntryContext.initEntries, Fri Feb 19 21:30:05 EET 2010, 1266607805120, 3 wars
a636ff8d_company-product-war.war
2891970f_company-product-war.war
44ae91f6_company-product-war.war
"http-0.0.0.0-8080-20" RUNNING
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:477)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:629)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:786)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:830)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195)
	at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169)
	at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
	at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:468)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:106)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getVirtualFile(VirtualFileURLConnection.java:118)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:93)
	at java.net.URL.openStream(URL.java:1010)
	at org.jboss.seam.deployment.SeamDeploymentProperties.addPropertiesFromResourceBundle(SeamDeploymentProperties.java:64)
"http-0.0.0.0-8080-1" RUNNING
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.jar.JarFile.<init>(JarFile.java:133)
	at java.util.jar.JarFile.<init>(JarFile.java:97)
	at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.ensureZipFile(ZipFileWrapper.java:173)
	at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.acquire(ZipFileWrapper.java:250)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:485)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:629)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:786)
	at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:830)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195)
	at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690)
	at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169)
	at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
	at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:468)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:106)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getVirtualFile(VirtualFileURLConnection.java:118)
	at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:93)
	at java.net.URL.openStream(URL.java:1010)
	at org.jboss.seam.deployment.SeamDeploymentProperties.addPropertiesFromResourceBundle(SeamDeploymentProperties.java:64)

3) Now there is 5 wars

Timer, Fri Feb 19 21:30:06 EET 2010, 1266607806398, 5 wars
b0875f50_company-product-war.war
a636ff8d_company-product-war.war
e5f6a718_company-product-war.war
2891970f_company-product-war.war
44ae91f6_company-product-war.war


Timer, Fri Feb 19 21:30:11 EET 2010, 1266607811397, 5 wars
b0875f50_company-product-war.war
a636ff8d_company-product-war.war
e5f6a718_company-product-war.war
2891970f_company-product-war.war
44ae91f6_company-product-war.war



> IterableTimedVFSCache leaks disk space when cache values get expired
> --------------------------------------------------------------------
>
>                 Key: JBAS-7728
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7728
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: JBossAS-5.1.0.GA
>            Reporter: Ari Savolainen
>            Assignee: Ales Justin
>         Attachments: jboss-vfs.jar
>
>
> When resolving virtual files, the TimedCachePolicy is checked for the
> expiration of the corresponding root context. If it is expired, the root is
> unpackaged again and tried to be readded into the cache. When updating the
> cache, method TimedCachePolicy.peek() is used to find out if the object is
> already present. The peek method does not take into account whether the value
> is expired or not and the object is never added into the cache (or the cache
> entry refreshed like in method TimedCachePolicy.get()). This is repeated over
> and over again and the disk gets eventually filled.
> The problem can be reproduced for example by deploying an enterprise
> application with maven jboss plugin: mvn jboss:deploy. (It uses method deploy
> of service jboss.system:service=MainDeployer through jmx-console.)
> Here are the corresponding stack trace fragments:
> 1) Check for the expiration
> http-0.0.0.0-8443-1 at 12019 daemon, prio=5, in group 'jboss', status: 'RUNNING'
> 	  at org.jboss.util.TimedCachePolicy.getValidKeys(TimedCachePolicy.java:358)
> 	  at org.jboss.virtual.plugins.cache.IterableTimedVFSCache.findContext(IterableTimedVFSCache.java:65)
> 	  at org.jboss.virtual.plugins.cache.CombinedVFSCache.findContext(CombinedVFSCache.java:116)
> 	  at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile(DefaultVFSRegistry.java:91)
> 	  at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile(DefaultVFSRegistry.java:140)
> 	  at org.jboss.virtual.VFS.getRoot(VFS.java:264)
> 	  at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:105)
> 2) Attempt to readd the root
> http-0.0.0.0-8443-1 at 12019 daemon, prio=5, in group 'jboss', status: 'RUNNING'
> 	  at org.jboss.util.TimedCachePolicy.peek(TimedCachePolicy.java:283)
> 	  at org.jboss.virtual.plugins.cache.CachePolicyVFSCache.putContext(CachePolicyVFSCache.java:143)
> 	  at org.jboss.virtual.plugins.cache.AbstractVFSCache.putContext(AbstractVFSCache.java:94)
> 	  at org.jboss.virtual.plugins.cache.CombinedVFSCache.putContext(CombinedVFSCache.java:140)
> 	  at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.addContext(DefaultVFSRegistry.java:74)
> 	  at org.jboss.virtual.VFS.getVFS(VFS.java:235)
> 	  at org.jboss.virtual.VFS.createNewRoot(VFS.java:249)
> 	  at org.jboss.virtual.VFS.getRoot(VFS.java:265)
> 	  at org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:105)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list