glassfish
  1. glassfish
  2. GLASSFISH-15967

Huge number of fileInstall Threads in Glassfish 3.1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1_dev
    • Fix Version/s: 3.1_dev
    • Component/s: OSGi-JavaEE
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      I have GlassFish V3.1 Build 41 Installation on following Platform.

      OS : Windows 7
      JVM : 32 Bit
      I see a lot of (fileInstall)Threads, about 1000 Threads, like

      fileinstall-C:\glassfish3\glassfish\domains\domain1/autodeploy/bundles/

      OS : Windows 7
      JVM : 64 Bit
      I see around 70000 (fileInstall)Threads, like

      fileinstall-C:\glassfish3\glassfish\domains\domain1/autodeploy/bundles/

      I dont think these are acceptable numbers.

      NOTE: THIS HAPPENS ONLY AFTER AN UPDATE. I UPDATED FROM "Build 30 - Build 41" USING UPDATE TOOL.
      NOTE: FOR A FRESH INSTALL I SEE ONLY ONE THREAD.

      I have CPU usage up to 60% on a HT/Quad Core Intel I7 Core.

      Any work around to stop the auto deploying of OSGI bundles?.

      I tried auto deploy from GUI and many other combos.. did not work.

      FYI. I used VisualVM 1.3.1 to verify these threads.

      I can post ScreenShots if Required.

      Steps to Recreate.
      ------------------
      Install Glasfish3.1 build (any previous build).
      Update to latest build via the Update tool.
      Watch the threads using Visual VM

      1. patch.txt
        5 kB
        Sanjeeb Sahoo
      1. JVM Summary.jpg
        262 kB
      2. screenshot-64bit VM.jpg
        380 kB

        Issue Links

          Activity

          Hide
          Subodh Karunakaran added a comment - - edited

          An Observation

          Removing "org.apache.felix.fileinstall-autodeploy-bundles.cfg" from GlassFish Installation Directory does seems to stop creating new threads on subsequent restarts. However it does not adress the problem of existing multiple fileinstall threads.

          Show
          Subodh Karunakaran added a comment - - edited An Observation Removing "org.apache.felix.fileinstall-autodeploy-bundles.cfg" from GlassFish Installation Directory does seems to stop creating new threads on subsequent restarts. However it does not adress the problem of existing multiple fileinstall threads.
          Hide
          Nazrul added a comment - - edited

          Thanks for update Subodh.

          Based on the comments, I think option 2 is safer since it handles both upgrade and existing fileinstall threads issues.

          I propose the following for 3.1 release (refined from the above list):
          1) Update to File Install 3.1.10. There are 3 fixes in this. All seem to be related to the reported issue.

          2) Change out the box configuration to reduce risks
          Option 2: Turn off File Install in DAS (server-config) by removing org.apache.felix.fileinstall from org.glassfish.additionalOSGiBundlesToStart list.

          <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>

          User will add org.apache.felix.fileinstall to use autodeploy feature.

          3) Turn off File Install in default-config. We do not support deployment in remote nodes. Everything needs to go through DAS.
          Remove org.apache.felix.fileinstall from org.glassfish.additionalOSGiBundlesToStart list for default-config.
          <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>

          Show
          Nazrul added a comment - - edited Thanks for update Subodh. Based on the comments, I think option 2 is safer since it handles both upgrade and existing fileinstall threads issues. I propose the following for 3.1 release (refined from the above list): 1) Update to File Install 3.1.10. There are 3 fixes in this. All seem to be related to the reported issue. 2) Change out the box configuration to reduce risks Option 2: Turn off File Install in DAS (server-config) by removing org.apache.felix.fileinstall from org.glassfish.additionalOSGiBundlesToStart list. <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options> User will add org.apache.felix.fileinstall to use autodeploy feature. 3) Turn off File Install in default-config. We do not support deployment in remote nodes. Everything needs to go through DAS. Remove org.apache.felix.fileinstall from org.glassfish.additionalOSGiBundlesToStart list for default-config. <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>
          Hide
          Sanjeeb Sahoo added a comment -

          To reply to Subodh's issue, if you remove the cfg file immediately after installing/upgrading to 3.1.10, there won't be any fileinstall thread watching autodeploy/bundles/ dir.

          To reply Nazrul, we simply can't turn off fileinstall in default-config. FileInstall is used to autostart all bundles that are in modules/autostart/ directory. Anyone using OSGi fetaures on clusters will need those bundles to be started in remote instances/clusters as well. So, we can do #1 & #2, but not #3.

          Show
          Sanjeeb Sahoo added a comment - To reply to Subodh's issue, if you remove the cfg file immediately after installing/upgrading to 3.1.10, there won't be any fileinstall thread watching autodeploy/bundles/ dir. To reply Nazrul, we simply can't turn off fileinstall in default-config. FileInstall is used to autostart all bundles that are in modules/autostart/ directory. Anyone using OSGi fetaures on clusters will need those bundles to be started in remote instances/clusters as well. So, we can do #1 & #2, but not #3.
          Hide
          Sanjeeb Sahoo added a comment -

          patch for review.

          Show
          Sanjeeb Sahoo added a comment - patch for review.
          Hide
          Sanjeeb Sahoo added a comment -

          Sending core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java
          Sending osgi-platforms/felix/pom.xml
          Sending packager/nucleus-base/lib/templates/domain.xml
          Transmitting file data ...
          Committed revision 45143.

          Show
          Sanjeeb Sahoo added a comment - Sending core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java Sending osgi-platforms/felix/pom.xml Sending packager/nucleus-base/lib/templates/domain.xml Transmitting file data ... Committed revision 45143.

            People

            • Assignee:
              Sanjeeb Sahoo
              Reporter:
              Subodh Karunakaran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: