Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7246

Memory leak with LIRS eviction strategy

XMLWordPrintable

    • Hide
      Run
      unzip reproducer.zip
      cd reproducer
      mvn compile dependency:copy-dependencies
      java -Xms32m -Xmx32m -cp target/classes:target/dependency/\* -DmaxEntries=10 -DnumberOfPut=160000 Main >/dev/null
      
      Result
      Nov 29, 2016 4:18:40 PM org.infinispan.factories.GlobalComponentRegistry start
      INFO: ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.5.Final
      Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
              at java.util.Locale.getInstance(Locale.java:746)
              at java.util.Locale.getInstance(Locale.java:742)
              at java.util.ResourceBundle$Control$CandidateListCache.getDefaultList(ResourceBundle.java:2465)
              at java.util.ResourceBundle$Control$CandidateListCache.createObject(ResourceBundle.java:2442)
              at java.util.ResourceBundle$Control$CandidateListCache.createObject(ResourceBundle.java:2372)
              at sun.util.locale.LocaleObjectCache.get(LocaleObjectCache.java:60)
              at java.util.ResourceBundle$Control.getCandidateLocales(ResourceBundle.java:2367)
              at sun.util.resources.LocaleData$LocaleDataResourceBundleControl.getCandidateLocales(LocaleData.java:209)
              at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1356)
              at java.util.ResourceBundle.getBundle(ResourceBundle.java:890)
              at sun.util.resources.LocaleData$1.run(LocaleData.java:167)
              at sun.util.resources.LocaleData$1.run(LocaleData.java:163)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.util.resources.LocaleData.getBundle(LocaleData.java:163)
              at sun.util.resources.LocaleData.getNumberFormatData(LocaleData.java:159)
              at sun.util.locale.provider.LocaleResources.getDecimalFormatSymbolsData(LocaleResources.java:168)
              at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:616)
              at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:113)
              at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85)
              at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180)
              at java.util.Formatter.getZero(Formatter.java:2283)
              at java.util.Formatter.<init>(Formatter.java:1892)
              at java.util.Formatter.<init>(Formatter.java:1930)
              at java.io.PrintStream.format(PrintStream.java:969)
              at java.io.PrintStream.printf(PrintStream.java:871)
              at Main.runTest(Main.java:28)
              at Main.main(Main.java:34)
      Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded
      Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded
      Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded
      Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded
      Nov 29, 2016 4:19:17 PM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAcceptLoop
      WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=56262] throws
      java.lang.OutOfMemoryError: GC overhead limit exceeded
      
      Show
      Run unzip reproducer.zip cd reproducer mvn compile dependency:copy-dependencies java -Xms32m -Xmx32m -cp target/classes:target/dependency/\* -DmaxEntries=10 -DnumberOfPut=160000 Main >/dev/ null Result Nov 29, 2016 4:18:40 PM org.infinispan.factories.GlobalComponentRegistry start INFO: ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.5.Final Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.Locale.getInstance(Locale.java:746) at java.util.Locale.getInstance(Locale.java:742) at java.util.ResourceBundle$Control$CandidateListCache.getDefaultList(ResourceBundle.java:2465) at java.util.ResourceBundle$Control$CandidateListCache.createObject(ResourceBundle.java:2442) at java.util.ResourceBundle$Control$CandidateListCache.createObject(ResourceBundle.java:2372) at sun.util.locale.LocaleObjectCache.get(LocaleObjectCache.java:60) at java.util.ResourceBundle$Control.getCandidateLocales(ResourceBundle.java:2367) at sun.util.resources.LocaleData$LocaleDataResourceBundleControl.getCandidateLocales(LocaleData.java:209) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1356) at java.util.ResourceBundle.getBundle(ResourceBundle.java:890) at sun.util.resources.LocaleData$1.run(LocaleData.java:167) at sun.util.resources.LocaleData$1.run(LocaleData.java:163) at java.security.AccessController.doPrivileged(Native Method) at sun.util.resources.LocaleData.getBundle(LocaleData.java:163) at sun.util.resources.LocaleData.getNumberFormatData(LocaleData.java:159) at sun.util.locale.provider.LocaleResources.getDecimalFormatSymbolsData(LocaleResources.java:168) at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:616) at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:113) at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85) at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180) at java.util.Formatter.getZero(Formatter.java:2283) at java.util.Formatter.<init>(Formatter.java:1892) at java.util.Formatter.<init>(Formatter.java:1930) at java.io.PrintStream.format(PrintStream.java:969) at java.io.PrintStream.printf(PrintStream.java:871) at Main.runTest(Main.java:28) at Main.main(Main.java:34) Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded Nov 29, 2016 4:19:17 PM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAcceptLoop WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=56262] throws java.lang.OutOfMemoryError: GC overhead limit exceeded

      There is a memory leak with the default eviction strategy. It's a leak in org.infinispan.commons.util.concurrent.jdk8backported.BoundedEquivalentConcurrentHashMapV8 with LIRS eviction strategy.
      There are cache entries in org.infinispan.container.DefaultDataContainer.entries and its size are bigger than cache size after eviction occurred.
      DefaultDataContainer.entries retain keys and values for evicted entries in the cache.
      After full GC, DefaultDataContainer.entries size wasn't changed.
      The following minimum reproducer exhibits a leak. Eviction is supposed to suppress OOME.

            Unassigned Unassigned
            rhn-support-jwon Ted Won
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: