Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6276

Bundle update results in leaking update*.jar files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.3
    • 4.3.0, 4.2.6
    • karaf
    • None

    Description

      We encounter leaking update*.jar files which ultimately result in a full disk. Listing files shows something like this:

      rw-rr- 1 root root 458M Apr 28 04:44 update-7283235896174400181.jar
      rw-rr- 1 root root 458M May  5 04:25 update-7296484626001425386.jar
      rw-rr- 1 root root 458M Apr 24 04:20 update-7339530845064123545.jar
      rw-rr- 1 root root 458M Apr 30 04:45 update-7807707341953713899.jar
      rw-rr- 1 root root 458M May  2 04:25 update-8043037041286514887.jar
      rw-rr- 1 root root 458M May  3 04:16 update-8313433533207318564.jar
      rw-rr- 1 root root 458M Apr 27 04:16 update-839710980329827978.jar
      rw-rr- 1 root root 458M Apr 25 04:31 update-8877699798146551228.jar

       

      As you can tell from the timestamps our update process kicks in somewhere around 4 in the morning. We call 

      URI featureRepo;

      featuresService.refreshRepository(featureRepo);

      ...

      EnumSet<Option> NO_OPTIONS = EnumSet.noneOf(Option.class);

      Map<String, Set<String>> NO_CHANGES = Collections.singletonMap(FeaturesService.ROOT_REGION, Collections.emptySet());

      featuresService.addRequirements(NO_CHANGES, NO_OPTIONS);

       

      Both calls to featuresService are guarded by the same ReentrantLock which is released after each call. Unfortunately we are not able to reproduce this issue. It seems to happen once in a while. What bothers me is the size of the update.jar with 458MB. From the code I understand it should be a single bundle.

       

      The stacktrace when the disk is finally full:

      org.osgi.framework.BundleException: Unable to update bundle
      at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.updateBundle(BundleInstallSupportImpl.java:149) ~[?:?]
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.updateBundle(FeaturesServiceImpl.java:1139) ~[?:?]
      at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:834) ~[?:?]
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1058) ~[?:?]
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:994) ~[?:?]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
      at java.lang.Thread.run(Thread.java:748) [?:?]
      Caused by: java.io.IOException: No space left on device
      at java.io.FileOutputStream.write(Native Method) ~[?:?]
      at java.io.FileOutputStream.write(FileOutputStream.java:290) ~[?:?]
      at java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java:720) ~[?:?]
      at java.util.zip.ZipOutputStream.writeLOC(ZipOutputStream.java:391) ~[?:?]
      at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:238) ~[?:?]
      at org.apache.karaf.util.bundles.BundleUtils.fixBundleWithUpdateLocation(BundleUtils.java:67) ~[?:?]
      at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.updateBundle(BundleInstallSupportImpl.java:145) ~[?:?]
      ... 8 more

       

       

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              henningtreu Henning Treu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: