Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1483

Threads leaking when DeploymentScannerService stopped as ScheduledExecutor not shutdown

    XMLWordPrintable

Details

    Description

      To test the changes for AS7-1473 added a temporary test to ServerInModuleDeploymentTestCase to loop 50 times and call each of the filesystem based test cases.

      Almost at the end the marker based test is being executed and the deployment requested to be deployed, the scanner picks this up and the following is logged: -

      16:50:42,027 DEBUG [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Deployment scan of [/home/darranl/src/jbossas7/jboss-as/testsuite/smoke/target/marker-deployments] found update action [{
          "operation" => "composite",
          "address" => undefined,
          "steps" => [
              {
                  "operation" => "add",
                  "address" => [("deployment" => "test-deployment.sar")],
                  "content" => [{
                      "path" => "/home/darranl/src/jbossas7/jboss-as/testsuite/smoke/target/marker-deployments/test-deployment.sar",
                      "archive" => true
                  }],
                  "persistent" => false
              },
              {
                  "operation" => "deploy",
                  "address" => [("deployment" => "test-deployment.sar")]
              }
          ]
      }]
      

      However the deployment is not logged and there is no further logging in relation to this scan.

      It appears however that the thread continues to be used for subsequent scans.

      16:50:46,997 TRACE [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Scanning directory /home/darranl/src/jbossas7/jboss-as/testsuite/smoke/target/jbossas/standalone/deployments for deployment content changes
      

      Reviewing the thread dump shows no threads blocked in a call to scan within FileSystemDeploymentService.

      After further testing the "OutOfMemoryError: unable to create new native thread" error was reported, the DeploymentScannerService is not calling shutdown on the SceduledExecutor once stops.

      Attachments

        Activity

          People

            darran.lofthouse@redhat.com Darran Lofthouse
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: