Buggy code:
profile . registerOperationHandler ( REMOVE , ProfileRemoveHandler . INSTANCE , ProfileRemoveHandler . INSTANCE , false ) ; profile . registerOperationHandler ( DESCRIBE , ProfileDescribeHandler . INSTANCE , ProfileDescribeHandler . INSTANCE , false , PRIVATE , readOnly ) ; final ModelNodeRegistration paths = root . registerSubModel ( PathElement . pathElement ( PATH ) , PATH_DESCRIPTION ) ; paths . registerOperationHandler ( ADD , PathAddHandler . NAMED_INSTANCE , PathAddHandler . NAMED_INSTANCE , false ) ; paths . registerOperationHandler ( REMOVE , PathRemoveHandler . INSTANCE , PathRemoveHandler . INSTANCE , false ) ; final ModelNodeRegistration socketBindingGroup = root . registerSubModel ( PathElement . pathElement ( SOCKET_BINDING_GROUP ) , DomainDescriptionProviders . SOCKET_BINDING_GROUP ) ; socketBindingGroup . registerOperationHandler ( ADD , SocketBindingGroupAddHandler . INSTANCE , SocketBindingGroupAddHandler . INSTANCE , false ) ; socketBindingGroup . registerOperationHandler ( REMOVE , SocketBindingGroupRemoveHandler . INSTANCE , SocketBindingGroupRemoveHandler . INSTANCE , false ) ; socketBindingGroup . registerReadWriteAttribute ( PORT_OFFSET , null , new IntRangeValidatingHandler ( 0 , 65535 , true , true ) , CONFIGURATION ) ; socketBindingGroup . registerReadWriteAttribute ( DEFAULT_INTERFACE , null , new StringLengthValidatingHandler ( 1 , false , true ) , CONFIGURATION ) ; socketBindingGroup . registerReadWriteAttribute ( INCLUDES , null , new org . jboss . as . controller . operations . global . WriteAttributeHandlers . ListValidatatingHandler ( new StringLengthValidator ( 1 , false ) , true , 0 , Integer . MAX_VALUE ) , CONFIGURATION ) ; socketBindingGroup . registerOperationHandler ( SocketBindingGroupIncludeAddHandler . OPERATION_NAME , SocketBindingGroupIncludeAddHandler . INSTANCE , SocketBindingGroupIncludeAddHandler . INSTANCE ) ; socketBindingGroup . registerOperationHandler ( SocketBindingGroupIncludeRemoveHandler . OPERATION_NAME , SocketBindingGroupIncludeRemoveHandler . INSTANCE , SocketBindingGroupIncludeRemoveHandler . INSTANCE ) ; final ModelNodeRegistration socketBindings = socketBindingGroup . registerSubModel ( PathElement . pathElement ( SOCKET_BINDING ) , DomainDescriptionProviders . SOCKET_BINDING ) ; socketBindings . registerOperationHandler ( ADD , SocketBindingAddHandler . INSTANCE , SocketBindingAddHandler . INSTANCE , false ) ; socketBindings . registerOperationHandler ( REMOVE , SocketBindingRemoveHandler . INSTANCE , SocketBindingRemoveHandler . INSTANCE , false ) ; socketBindings . registerReadWriteAttribute ( INTERFACE , null , new StringLengthValidatingHandler ( 1 , true , true ) , CONFIGURATION ) ; socketBindings . registerReadWriteAttribute ( PORT , null , new IntRangeValidatingHandler ( 0 , 65535 , false , true ) , CONFIGURATION ) ; socketBindings . registerReadWriteAttribute ( FIXED_PORT , null , new org . jboss . as . controller . operations . global . WriteAttributeHandlers . ModelTypeValidatingHandler ( ModelType . BOOLEAN , true , true ) , CONFIGURATION ) ; socketBindings . registerReadWriteAttribute ( MULTICAST_ADDRESS , null , new InetAddressValidatingHandler ( true , true ) , CONFIGURATION ) ; socketBindings . registerReadWriteAttribute ( MULTICAST_PORT , null , new IntRangeValidatingHandler ( 0 , 65535 , true , true ) , CONFIGURATION ) ; final ModelNodeRegistration serverGroups = root . registerSubModel ( PathElement . pathElement ( SERVER_GROUP ) , DomainDescriptionProviders . SERVER_GROUP ) ; serverGroups . registerOperationHandler ( ADD , ServerGroupAddHandler . INSTANCE , ServerGroupAddHandler . INSTANCE , false ) ; serverGroups . registerOperationHandler ( REMOVE , ServerGroupRemoveHandler . INSTANCE , ServerGroupRemoveHandler . INSTANCE , false ) ; serverGroups . registerReadWriteAttribute ( SOCKET_BINDING_GROUP , null , WriteAttributeHandlers . WriteAttributeOperationHandler . INSTANCE , CONFIGURATION ) ; serverGroups . registerReadWriteAttribute ( SOCKET_BINDING_PORT_OFFSET , null , new IntRangeValidatingHandler ( 1 ) , CONFIGURATION ) ; final ModelNodeRegistration groupVMs = serverGroups . registerSubModel ( PathElement . pathElement ( JVM ) , JVM_PROVIDER ) ; JVMHandlers . register ( groupVMs ) ; ServerGroupDeploymentReplaceHandler sgdrh = new ServerGroupDeploymentReplaceHandler ( fileRepository ) ; serverGroups . registerOperationHandler ( ServerGroupDeploymentReplaceHandler . OPERATION_NAME , sgdrh , sgdrh ) ; final ModelNodeRegistration serverGroupDeployments = serverGroups . registerSubModel ( PathElement . pathElement ( DEPLOYMENT ) , SERVER_GROUP_DEPLOYMENT ) ; ServerGroupDeploymentAddHandler sgdah = new ServerGroupDeploymentAddHandler ( fileRepository ) ; serverGroupDeployments . registerOperationHandler ( ServerGroupDeploymentAddHandler . OPERATION_NAME , sgdah , sgdah ) ; serverGroupDeployments . registerOperationHandler ( ServerGroupDeploymentDeployHandler . OPERATION_NAME , ServerGroupDeploymentDeployHandler . INSTANCE , ServerGroupDeploymentDeployHandler . INSTANCE ) ; serverGroupDeployments . registerOperationHandler ( ServerGroupDeploymentRedeployHandler . OPERATION_NAME , ServerGroupDeploymentRedeployHandler . INSTANCE , ServerGroupDeploymentRedeployHandler . INSTANCE ) ; serverGroupDeployments . registerOperationHandler ( ServerGroupDeploymentUndeployHandler . OPERATION_NAME , ServerGroupDeploymentUndeployHandler . INSTANCE , ServerGroupDeploymentUndeployHandler . INSTANCE ) ; serverGroupDeployments . registerOperationHandler ( DeploymentRemoveHandler . OPERATION_NAME , ServerGroupDeploymentRemoveHandler . INSTANCE , ServerGroupDeploymentRemoveHandler . INSTANCE ) ; ModelNodeRegistration serverGroupSystemProperties = serverGroups . registerSubModel ( PathElement . pathElement ( SYSTEM_PROPERTY ) , SERVER_GROUP_SYSTEM_PROPERTY_PROVIDER ) ; serverGroupSystemProperties . registerOperationHandler ( SystemPropertyAddHandler . OPERATION_NAME , INSTANCE_WITH_BOOTTIME , INSTANCE_WITH_BOOTTIME , false ) ; serverGroupSystemProperties . registerOperationHandler ( SystemPropertyRemoveHandler . OPERATION_NAME , SystemPropertyRemoveHandler . INSTANCE , SystemPropertyRemoveHandler . INSTANCE , false ) ; serverGroupSystemProperties . registerReadWriteAttribute ( VALUE , null , SystemPropertyValueWriteAttributeHandler . INSTANCE , CONFIGURATION ) ; serverGroupSystemProperties . registerReadWriteAttribute ( BOOT_TIME , null , new org . jboss . as . controller . operations . global . WriteAttributeHandlers . ModelTypeValidatingHandler ( ModelType . BOOLEAN ) , CONFIGURATION ) ; final ModelNodeRegistration deployments = root . registerSubModel ( PathElement . pathElement ( DEPLOYMENT ) , DEPLOYMENT_PROVIDER ) ; DeploymentAddHandler dah = new DeploymentAddHandler ( contentRepo ) ; deployments . registerOperationHandler ( DeploymentAddHandler . OPERATION_NAME , dah , dah ) ; deployments . registerOperationHandler ( DeploymentRemoveHandler . OPERATION_NAME , DeploymentRemoveHandler . INSTANCE , DeploymentRemoveHandler . INSTANCE ) ; final ModelNodeRegistration extensions = root . registerSubModel ( PathElement . pathElement ( EXTENSION ) , EXTENSION_PROVIDER ) ; final ExtensionContext extensionContext = new org . jboss . as . controller . ExtensionContextImpl ( profile , deployments , configurationPersister ) ; final ExtensionAddHandler addExtensionHandler = new ExtensionAddHandler ( extensionContext ) ; extensions . registerOperationHandler ( ExtensionAddHandler . OPERATION_NAME , addExtensionHandler , addExtensionHandler , false ) ; extensions . registerOperationHandler ( ExtensionRemoveHandler . OPERATION_NAME , ExtensionRemoveHandler . INSTANCE , ExtensionRemoveHandler . INSTANCE , false ) ; if ( ! isMaster ) { root . registerOperationHandler ( ApplyRemoteMasterDomainModelHandler . OPERATION_NAME , ApplyRemoteMasterDomainModelHandler . INSTANCE , ApplyRemoteMasterDomainModelHandler . INSTANCE , false , PRIVATE ) ; } else { ReadMasterDomainModelHandler rmdmh = new ReadMasterDomainModelHandler ( domainController , registry ) ; <START_BUG> root . registerOperationHandler ( ReadMasterDomainModelHandler . OPERATION_NAME , rmdmh , rmdmh , false , PRIVATE ) ; <END_BUG> } return extensionContext ; } }

Fix:
root . registerOperationHandler ( ReadMasterDomainModelHandler . OPERATION_NAME , rmdmh , rmdmh , false , PRIVATE , EnumSet . of ( READ_ONLY ) ) ;