Buggy code:
class OSGiSubsystemAdd extends AbstractBoottimeAddStepHandler { static final OSGiSubsystemAdd INSTANCE = new OSGiSubsystemAdd ( ) ; private OSGiRuntimeResource resource ; private OSGiSubsystemAdd ( ) { } @ Override protected Resource createResource ( OperationContext context ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { OSGiLogger . LOGGER . infoActivatingSubsystem ( ) ; final Activation activation = Activation . valueOf ( ACTIVATION . resolveModelAttribute ( context , model ) . asString ( ) . toUpperCase ( Locale . ENGLISH ) ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> final InitialDeploymentTracker deploymentTracker = new InitialDeploymentTracker ( context , verificationHandler ) ; <END_BUG> final ModuleRegistrationTracker registrationTracker = new ModuleRegistrationTracker ( ) ; final List < SubsystemExtension > extensions = new ArrayList < SubsystemExtension > ( ) ; final Iterator < SubsystemExtension > services = ServiceLoader . load ( SubsystemExtension . class , getClass ( ) . getClassLoader ( ) ) . iterator ( ) ; while ( services . hasNext ( ) ) { extensions . add ( services . next ( ) ) ; } context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { newControllers . add ( FrameworkBootstrapService . addService ( serviceTarget , resource , deploymentTracker , extensions , verificationHandler ) ) ; newControllers . add ( registrationTracker . install ( serviceTarget , verificationHandler ) ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } } , RUNTIME ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { @ Override protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_OSGI_MANIFEST , new OSGiManifestStructureProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_BUNDLE_SUB_DEPLOYMENT , new BundleSubDeploymentMarkingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_BUNDLE_INFO , new OSGiBundleInfoParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_PROPERTIES , new OSGiXServiceParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_DEPLOYMENT , new BundleDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_COMPONENTS , new OSGiComponentParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_OSGI_SUBSYSTEM_ACTIVATOR , new org . jboss . as . osgi . deployment . FrameworkActivateProcessor ( deploymentTracker ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , REGISTER , REGISTER_BUNDLE_INSTALL , new org . jboss . as . osgi . deployment . BundleInstallProcessor ( deploymentTracker ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_BUNDLE , new BundleDependenciesProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , CONFIGURE_MODULE , CONFIGURE_RESOLVE_BUNDLE , new BundleResolveProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , CONFIGURE_MODULE , CONFIGURE_DEFERRED_PHASE , new DeferredPhaseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_RESOLVER_MODULE , new org . jboss . as . osgi . deployment . ModuleRegisterProcessor ( registrationTracker ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_BUNDLE_ACTIVATE , new BundleActivateProcessor ( ) ) ; } } , RUNTIME ) ; for ( SubsystemExtension extension : extensions ) { extension . performBoottime ( context , operation , model , verificationHandler , newControllers ) ; } newControllers . add ( SubsystemState . addService ( serviceTarget , activation ) ) ; } }

Fix:
final InitialDeploymentTracker deploymentTracker = new InitialDeploymentTracker ( context ) ;