Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1505

OutOfMemoryError in YangStoreSnapshot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • None
    • config
    • None
    • Operating System: All
      Platform: All

    • 5625

      I've observed OutOfMemoryError in YangStoreSnapshot while pushing a config:

      Exception in thread "config-pusher" java.lang.OutOfMemoryError
      at java.util.zip.Inflater.inflateBytes(Native Method)
      at java.util.zip.Inflater.inflate(Inflater.java:259)
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
      at java.io.FilterInputStream.read(FilterInputStream.java:107)
      at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleEntry$ZipBundleEntryInputStream.read(ZipBundleEntry.java:161)
      at com.google.common.io.ByteStreams.copy(ByteStreams.java:70)
      at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:115)
      at org.opendaylight.controller.config.facade.xml.osgi.YangStoreSnapshot.getModuleSource(YangStoreSnapshot.java:159)
      at org.opendaylight.controller.config.facade.xml.osgi.YangStoreService.getModuleSource(YangStoreService.java:98)
      at org.opendaylight.controller.config.facade.xml.ConfigSubsystemFacadeFactory.getCurrentCapabilities(ConfigSubsystemFacadeFactory.java:48)
      at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.waitForCapabilities(ConfigPusherImpl.java:180)
      at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:159)
      at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:129)
      at org.opendaylight.controller.config.persist.impl.ConfigPusherImpl.processSingle(ConfigPusherImpl.java:83)

      This is reproducible if you change or add an invalid required capability so it retries. After a period of time the OutOfMemoryError will occur.

      This is caused by a resource leak in YangStoreSnapshot getModuleSource - it doesn't close the InputStream returned via yangTextSchemaSource.openStream().

      I think this error can also occur for valid configs if there are enough of them but it definitely occurs with failure retries.

            tpantelis Tom Pantelis
            tpantelis Tom Pantelis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: