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

Classloader deadlock in ModuleFrameworkClassLoader

    Details

      Description

      Sometimes Master hangs at startup, see the attached thread dump for more details.

      As of Java SE 7, class loading related locks can have a finer granularity, that is, not the whole ClassLoader is locked, but the ClassLoader + <name of class begin loaded> instead.

      http://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html

      Steps to reproduce:

      That is a intermittent issue. You have to start the portal several times to reproduce.
      When it passes through this point (loading portal-ext), you haven't reproduced, you can interrupt the boot process and try again.

      INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
      Sep 09, 2014 10:16:58 AM org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor /home/lcsontos/liferay/instances/lportal-trunk/tomcat-7.0.34/conf/Catalina/localhost/ROOT.xml
      Sep 09, 2014 10:17:10 AM org.apache.catalina.core.ApplicationContext log
      INFO: No Spring WebApplicationInitializer types detected on classpath
      Loading jar:file:/home/lcsontos/liferay/instances/lportal-trunk/tomcat-7.0.34/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      Loading file:/home/lcsontos/liferay/instances/lportal-trunk/tomcat-7.0.34/webapps/ROOT/WEB-INF/classes/system-ext.properties
      Loading jar:file:/home/lcsontos/liferay/instances/lportal-trunk/tomcat-7.0.34/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      Loading file:/home/lcsontos/liferay/instances/lportal-trunk/portal-ext.properties

      If it got stuck at this point, take a thread dump and compare it to that one which is filed to the ticket. There should be such a part near to the end of the thread dump, which is saying that a deadlock has been detected.
      Found one Java-level deadlock:
      =============================
      "com.liferay.portal.log.bridge.internal.LogBridge@64c2fde":
      waiting to lock monitor 0x00007f1ad4048418 (object 0x00000007662e18b0, a com.liferay.portal.module.framework.ModuleFrameworkClassLoader),
      which is held by "localhost-startStop-1"
      "localhost-startStop-1":
      waiting to lock monitor 0x00007f1ad4044fd8 (object 0x0000000780762ac0, a org.apache.catalina.loader.WebappClassLoader),
      which is held by "com.liferay.portal.log.bridge.internal.LogBridge@64c2fde"

      Actual Results:
      A deadlock has been detected.

        Attachments

          Activity

            People

            • Assignee:
              joyce.wang Joyce Wang
              Reporter:
              laszlo.csontos Laszlo Csontos (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 1 day ago

                Packages

                Version Package
                7.0.0 M3