Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-130393

BlogsEntryServiceTest: java.lang.OutOfMemoryError: GC overhead limit exceeded

    Description

    Steps to reproduce

    cd modules/apps/blogs/blogs-test
    gw testIntegration --tests com.liferay.blogs.service.test.BlogsEntryServiceTest
    

    Expected

    All tests pass.

    Observed

    After 20 minutes more or less seeing tests passing, they begin to fail with irregular stacktraces. This is due to server memory slowly depleting over time, resulting in several "java.lang.OutOfMemoryError: GC overhead limit exceeded".

    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntriesPrevAndNextWithoutPrevViewPermission STARTED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntriesPrevAndNextWithoutPrevViewPermission PASSED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithViewPermission STARTED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithViewPermission PASSED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithViewPermission2 STARTED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithViewPermission2 FAILED
        java.lang.OutOfMemoryError: GC overhead limit exceeded
        	at java.util.WeakHashMap.newTable(WeakHashMap.java:195)
        	at java.util.WeakHashMap.<init>(WeakHashMap.java:220)
        	at java.util.WeakHashMap.<init>(WeakHashMap.java:241)
        	at java.util.zip.ZipFile.<init>(ZipFile.java:328)
        	at java.util.zip.ZipFile.<init>(ZipFile.java:149)
        	at java.util.jar.JarFile.<init>(JarFile.java:166)
        	at java.util.jar.JarFile.<init>(JarFile.java:130)
        	at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:241)
        	at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:226)
        	at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:314)
        	at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:97)
        	at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:263)
        	at org.apache.catalina.webresources.StandardRoot.getResourcesInternal(StandardRoot.java:327)
        	at org.apache.catalina.webresources.CachedResource.validateResources(CachedResource.java:158)
        	at org.apache.catalina.webresources.Cache.getResources(Cache.java:165)
        	at org.apache.catalina.webresources.StandardRoot.getResources(StandardRoot.java:315)
        	at org.apache.catalina.webresources.StandardRoot.getClassLoaderResources(StandardRoot.java:231)
        	at org.apache.catalina.loader.WebappClassLoaderBase.findResources(WebappClassLoaderBase.java:990)
        	at org.apache.catalina.loader.WebappClassLoaderBase.getResources(WebappClassLoaderBase.java:1085)
        	at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348)
        	at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
        	at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
        	at javax.xml.stream.FactoryFinder$1.run(FactoryFinder.java:352)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:341)
        	at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:313)
        	at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:227)
        	at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:130)
        	at com.liferay.portal.util.LocalizationImpl.getXml(LocalizationImpl.java:853)
        	at com.liferay.portal.util.LocalizationImpl.updateLocalization(LocalizationImpl.java:1140)
        	at com.liferay.portal.kernel.util.LocalizationUtil.updateLocalization(LocalizationUtil.java:391)
        	at com.liferay.portal.security.service.access.policy.model.impl.SAPEntryModelImpl.setTitleMap(SAPEntryModelImpl.java:760)
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithoutViewPermission STARTED
    
    com.liferay.blogs.service.test.BlogsEntryServiceTest > testGetEntryWithoutViewPermission FAILED
        java.lang.AssertionError: Thread Thread[fileinstall-directory-watcher,5,main] caught concurrent failure: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        	at com.liferay.portal.test.rule.LogAssertionTestRule$LogAppender.append(LogAssertionTestRule.java:330)
        	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
        	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
        	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
        	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
        	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:540)
        	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:498)
        	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:481)
        	at org.apache.logging.log4j.core.config.LoggerConfig.logParent(LoggerConfig.java:531)
        	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:500)
        	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:481)
        	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:456)
        	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:82)
        	at org.apache.logging.log4j.core.Logger.log(Logger.java:161)
        	at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2205)
        	at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2159)
        	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2142)
        	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1994)
        	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1852)
        	at com.liferay.portal.log.Log4jLogImpl.error(Log4jLogImpl.java:58)
        	at com.liferay.portal.kernel.log.LogWrapper.error(LogWrapper.java:69)
        	at com.liferay.portal.kernel.log.SanitizerLogWrapper.error(SanitizerLogWrapper.java:114)
        	at com.liferay.portal.file.install.internal.DirectoryWatcher.run(DirectoryWatcher.java:302)
        	Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        		... 23 more
        		Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        			... 23 more
        			Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        				... 23 more
        				Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        					... 23 more
        					Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        						... 23 more
        						Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        							... 23 more
        							Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        								... 23 more
        								Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        									... 23 more
        									Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        										... 23 more
        										Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        											... 23 more
        											Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        												... 23 more
        												Suppressed: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.file.install.internal.DirectoryWatcher, message=java.lang.OutOfMemoryError: GC overhead limit exceeded
        													... 23 more
        												Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        													at java.util.Arrays.copyOf(Arrays.java:3236)
        													at java.lang.StringCoding.safeTrim(StringCoding.java:79)
        													at java.lang.StringCoding.access$300(StringCoding.java:50)
        													at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:305)
        													at java.lang.StringCoding.encode(StringCoding.java:344)
        													at java.lang.String.getBytes(String.java:918)
        													at java.io.UnixFileSystem.getLastModifiedTime(Native Method)
        													at java.io.File.lastModified(File.java:943)
        													at com.liferay.portal.file.install.internal.Scanner._checksum(Scanner.java:116)
        													at com.liferay.portal.file.install.internal.Scanner._checksum(Scanner.java:105)
        													at com.liferay.portal.file.install.internal.Scanner._processFiles(Scanner.java:224)
        													at com.liferay.portal.file.install.internal.Scanner.scan(Scanner.java:89)
        													at com.liferay.portal.file.install.internal.DirectoryWatcher.run(DirectoryWatcher.java:269)
        											Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        												at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300)
        												at java.lang.StringCoding.encode(StringCoding.java:344)
        												at java.lang.StringCoding.encode(StringCoding.java:387)
        												at java.lang.String.getBytes(String.java:958)
        												at com.liferay.portal.file.install.internal.Scanner._checksum(Scanner.java:113)
        												at com.liferay.portal.file.install.internal.Scanner._checksum(Scanner.java:105)
        												at com.liferay.portal.file.install.internal.Scanner._processFiles(Scanner.java:224)
        												at com.liferay.portal.file.install.internal.Scanner.scan(Scanner.java:89)
        												at com.liferay.portal.file.install.internal.DirectoryWatcher.run(DirectoryWatcher.java:269)
        										Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
        	[CIRCULAR REFERENCE:java.lang.OutOfMemoryError: GC overhead limit exceeded]
    

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            yvonne.han Yvonne Han
            Reporter:
            andre.oliveira André Ricardo Barreto de Oliveira
            Participants of an Issue:
            Recent user:
            Rafaela Nascimento
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 weeks ago

                Packages

                Version Package
                7.4.0 CE GA1
                7.4.1 CE GA2
                Master