-
Bug
-
Resolution: Done
-
None
-
None
-
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.