Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7110

ClusterPartition.ThreadGate can block shutdown of AS

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.M1
    • Component/s: Clustering
    • Labels:
      None

      Description

      The following stack trace appears in a thread dump, after a failure to shutdown the AS within the testsuite:

      Thread: JBoss Shutdown Hook : priority:5, demon:true, threadId:11, threadState:TIMED_WAITING

      • waiting on <0x1d7ada9> (a org.jboss.ha.framework.server.ClusterPartition$ThreadGate)
        java.lang.Object.wait(Native Method)
        org.jboss.ha.framework.server.ClusterPartition$ThreadGate.await(ClusterPartition.java:2381)
        org.jboss.ha.framework.server.ClusterPartition.callAsynchMethodOnCluster(ClusterPartition.java:1325)
        org.jboss.ha.framework.server.DistributedReplicantManagerImpl.remove(DistributedReplicantManagerImpl.java:448)
        org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.shutdown(DefaultRepositoryClusteringHandler.java:275)
        org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.unload(ClusteredDeploymentRepository.java:459)
        org.jboss.system.server.profile.repository.AbstractProfile.destroy(AbstractProfile.java:163)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:97)
        org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:77)
        org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.uninstall(AbstractProfileLifeCycleAction.java:57)
        org.jboss.system.server.profileservice.repository.AbstractProfileAction.uninstall(AbstractProfileAction.java:70)
        org.jboss.system.server.profileservice.repository.AbstractProfileService.uninstall(AbstractProfileService.java:417)
        org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
        org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1665)
        org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1276)
        org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1180)
        org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1235)
        org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1180)
        org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1235)
        org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:828)
        org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        org.jboss.system.server.profileservice.repository.AbstractProfileService.deactivateProfile(AbstractProfileService.java:448)
        org.jboss.system.server.profileservice.ProfileServiceBootstrap.deactivateProfiles(ProfileServiceBootstrap.java:381)
        org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:339)
        org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:571)
        org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:909)

      The root cause is a bug in ThreadGate.await(long), which does not correctly return if the timeout value is reached while the gate is still closed.

      This same issue was found and fixed in JBC. See JBCACHE-1173.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pferraro Paul Ferraro
                Reporter:
                pferraro Paul Ferraro
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: