2 Replies Latest reply on Aug 8, 2011 8:49 PM by robinr

    VFS leak detected

    thomas.diesler

      robinr says,

       

      http://stackoverflow.com/questions/6933238/jboss-osgi-problem

       

      I am trying to run the JBoss AS7 OSGi example, but it crashes with this mysterious message. Platform is OS X 10.6 and Java 1.6.0_26.

      Any clues?

      mvn3 clean install

      ...

      Running org.jboss.test.osgi.jbosgi142.OSGi142TestCase java.io.IOException: VirtualFile created in this stack frame not closed: "/stream1312404259028"    at org.jboss.osgi.vfs30.VirtualFileAdaptor30.(VirtualFileAdaptor30.java:115) at org.jboss.osgi.vfs30.VirtualFileAdaptor30.(VirtualFileAdaptor30.java:104) at org.jboss.osgi.vfs30.VFSAdaptor30.toVirtualFile(VFSAdaptor30.java:69) at org.jboss.osgi.vfs.AbstractVFS.toVirtualFile(AbstractVFS.java:54) at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundleInternal(AbstractBundleContext.java:152) at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundle(AbstractBundleContext.java:125) at org.jboss.osgi.testing.internal.EmbeddedRuntimeImpl.installBundleInternal(EmbeddedRuntimeImpl.java:106) at org.jboss.osgi.testing.internal.OSGiRuntimeImpl.installBundle(OSGiRuntimeImpl.java:145) at org.jboss.osgi.testing.internal.OSGiRuntimeImpl.installBundle(OSGiRuntimeImpl.java:127) at org.jboss.test.osgi.localization.LocalizationRuntimeTestCase.testFragmentLocalization(LocalizationRuntimeTestCase.java:73)

        • 1. Re: VFS leak detected
          thomas.diesler

          This is actually a debug error log. It indicates that the virtual file created by LocalizationRuntimeTestCase does not get closed for some reason. It'd be interesting to find out why it does not get closed. Does this failure affect subsequent tests?

           

          You can turn off VFS leak detection by setting the surefire system property

           

                          <property>
                            <name>jboss.osgi.vfs.leakDebugging</name>
                            <value>false</value>
                          </property>
          

           

          in the testsuite/pom.xml

          • 2. Re: VFS leak detected
            robinr

            All "JBossOSGi Testsuite Examples" failed. After setting the property and a clean build those tests pass,

            but these fail:

             

              testHostLocalization(org.jboss.test.osgi.localization.LocalizationRuntimeTestCase)

              testFragmentLocalization(org.jboss.test.osgi.localization.LocalizationRuntimeTestCase)

             

            This prompted me to set prefix the build command with LC_ALL=C. And now the

            tests work.