Plague of jar files

One of the development app servers that we recently upgraded to Java 6 and JBoss 5.0.0.GA’s hard drive filled up.  I emptied 4GB out of the Recycle Bin, which let a build complete Friday, but by this morning it was full again.

A diligent co-worker discovered a server\default\tmp\vfs-nested.tmp\ directory containing 67,444 hexadecimally-named jar files totalling 16GB in size.

The Research

A quick search turned up this in the JBoss 5.0.0.Beta4 Release Notes:

Excessive nestedjarNNN.tmp files in the tmp directory. The VFS unwraps nested jars by extracting the nested jar into a tmp file in the java tmp directory. This can result in a large number of files that fill up the tmp directory. You can disable this behavior by setting -Djboss.vfs.forceNoCopy=true on command line used to start jboss. This will be enabled by default in a future release, JBAS-4389.

That was 5.0.0 Beta 4.  In 5.0.0.CR1, JBAS-4389 made NoCopy the default behavior.  Also in CR1 though, JBAS-5262 replaced the jboss.vfs.forceNoCopy setting with a jboss.vfs.forceCopy setting defaulting to false; and JBAS-5633 enabled jboss.vfs.forceCopy by default, if unspecified.

SO THAT… by the time you get to the JBoss 5.0.0.GA Release Notes, we see:

JBoss VFS provides a set of different switches to control it’s internal behavior. JBoss AS sets jboss.vfs.forceCopy=true by default.

A Workaround

I gather that to turn off the copying for JBoss5.0.0.GA, we would set

-Djboss.vfs.forceCopy=false

on the JBoss command line.

Update: It looks like when we set the forceCopy flag to false, the heap space may fill up in memory instead.  We may need a better solution!

Update 2: In this JBoss forum thread, alesj says:

I’ve got the fix locally, just need to create some proper long running tests.  But this will be definitely included in the up-coming 5.0.1.

Advertisements

  1. #1 by alesj on January 5, 2009 - 3:55 pm

  2. #2 by danielmeyer on January 6, 2009 - 2:22 pm

    Thanks for the tip, alesj!
    -Daniel-

  3. #3 by Pino on February 16, 2011 - 5:41 am

    It’s caused by a missing entry in a config file: see
    https://issues.jboss.org/browse/JBPAPP-2338 for v5.0
    https://issues.jboss.org/browse/JBAS-7126 for v5.1

    Do not change anything else.

  1. laststation.net » Blog Archive » JBoss AS 5.0 and Beyond
  2. Disco cheio com JBoss 5.1.0.GA « HugoSan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s