Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3199

permissions.xml is not parsed if -Dorg.jboss.server.bootstrap.maxThreads is explicitly set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.0.Final
    • 3.0.0.Beta31
    • Security
    • None
    • Hide
      • Add the -Dorg.jboss.server.bootstrap.maxThreads=<whatever> system property.
      • Create a simple EAR containing an invalid permissions.xml file (I can upload an EAR if you consider so).
      • Deploy the above EAR in Wildfly.
        You'll notice that the permissions.xml is not parsed and no errors are logged into the console.

      Next, start Wildfly without the -Dorg.jboss.server.bootstrap.maxThreads=<whatever> system property and the deployment will fail.

      11:01:22,943 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."app1.ear".PARSE: org.jboss.msc.service.StartExcep
      tion in service jboss.deployment.unit."app1.ear".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "app1.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: ParseError at [row,col]:[1,1]
      Message: Missing required attribute(s): VERSION
      at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.parsePermissions(PermissionsParseProcessor.java:175)
      at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.deploy(PermissionsParseProcessor.java:123)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
      ... 5 more
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
      Message: Missing required attribute(s): VERSION
      at org.jboss.metadata.parser.util.MetaDataElementParser.missingRequired(MetaDataElementParser.java:146)
      at org.wildfly.extension.security.manager.deployment.PermissionsParser.parsePermissions(PermissionsParser.java:106)
      at org.wildfly.extension.security.manager.deployment.PermissionsParser.parse(PermissionsParser.java:62)
      at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.parsePermissions(PermissionsParseProcessor.java:173)
      ... 7 more

      Show
      Add the -Dorg.jboss.server.bootstrap.maxThreads=<whatever> system property. Create a simple EAR containing an invalid permissions.xml file (I can upload an EAR if you consider so). Deploy the above EAR in Wildfly. You'll notice that the permissions.xml is not parsed and no errors are logged into the console. Next, start Wildfly without the -Dorg.jboss.server.bootstrap.maxThreads=<whatever> system property and the deployment will fail. 11:01:22,943 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."app1.ear".PARSE: org.jboss.msc.service.StartExcep tion in service jboss.deployment.unit."app1.ear".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "app1.ear" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: ParseError at [row,col] : [1,1] Message: Missing required attribute(s): VERSION at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.parsePermissions(PermissionsParseProcessor.java:175) at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.deploy(PermissionsParseProcessor.java:123) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156) ... 5 more Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col] : [1,1] Message: Missing required attribute(s): VERSION at org.jboss.metadata.parser.util.MetaDataElementParser.missingRequired(MetaDataElementParser.java:146) at org.wildfly.extension.security.manager.deployment.PermissionsParser.parsePermissions(PermissionsParser.java:106) at org.wildfly.extension.security.manager.deployment.PermissionsParser.parse(PermissionsParser.java:62) at org.wildfly.extension.security.manager.deployment.PermissionsParseProcessor.parsePermissions(PermissionsParseProcessor.java:173) ... 7 more

      If -Dorg.jboss.server.bootstrap.maxThreads is explictily set in Wildfly, then, the permissions.xml file is not even parsed when the application is deployed.

      Debugging the Wildfly 8.2.0 source code revealed the problem in org.jboss.as.server.ServerService#addService:218

      if (configuration.getServerEnvironment().isAllowModelControllerExecutor()) {
                  serviceBuilder.addDependency(Services.JBOSS_SERVER_EXECUTOR, ExecutorService.class, service.getExecutorServiceInjector());
              }
      

      The org.jboss.as.server.ServerEnvironment#allowModelControllerExecutor property is set to true if -Dorg.jboss.server.bootstrap.maxThreads was set.

      The above 'if' seems a little strange because a default value for maxThreads is always set in org.jboss.as.server.ServerEnvironment#getBootstrapMaxThreads even when the -Dorg.jboss.server.bootstrap.maxThreads property was not specified.

      This may also cause other things to not work properly when -Dorg.jboss.server.bootstrap.maxThreads is set.

              jaikiran Jaikiran Pai (Inactive)
              burzumel_jira Marius Ani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: