Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7728

IterableTimedVFSCache leaks disk space when cache values get expired

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-5.1.0.GA
    • None
    • None

      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@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@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)

              ajustin@redhat.com Ales Justin
              hadrianus_jira Ari Savolainen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: