Buggy code:
final class BootstrapImpl implements Bootstrap { private static final int MAX_THREADS = ServerEnvironment . getBootstrapMaxThreads ( ) ; private final BootstrapImpl . ShutdownHook shutdownHook ; private final ServiceContainer container ; public BootstrapImpl ( ) { } @ Override public AsyncFuture < ServiceContainer > bootstrap ( final Configuration configuration , final List < ServiceActivator > extraServices ) { try { final Object value = ManagementFactory . getPlatformMBeanServer ( ) . getAttribute ( new ObjectName ( "java.lang" , "type" , "OperatingSystem" ) , "MaxFileDescriptorCount" ) ; final long fdCount = Long . valueOf ( value . toString ( ) ) . longValue ( ) ; if ( fdCount < 4096L ) { FD_LIMIT_LOGGER . fdTooLow ( fdCount ) ; } } catch ( Throwable ignored ) { } assert configuration != null : "configuration<seq2seq4repair_space>is<seq2seq4repair_space>null" ; String resolverWarning = WildFlySecurityManager . getPropertyPrivileged ( "org.jboss.resolver.warning" , null ) ; if ( resolverWarning == null ) { WildFlySecurityManager . setPropertyPrivileged ( "org.jboss.resolver.warning" , "true" ) ; } final ModuleLoader moduleLoader = configuration . getModuleLoader ( ) ; final Bootstrap . ConfigurationPersisterFactory configurationPersisterFactory = configuration . getConfigurationPersisterFactory ( ) ; assert configurationPersisterFactory != null : "configurationPersisterFactory<seq2seq4repair_space>is<seq2seq4repair_space>null" ; try { Module . registerURLStreamHandlerFactoryModule ( moduleLoader . loadModule ( ModuleIdentifier . create ( "org.jboss.vfs" ) ) ) ; } catch ( ModuleLoadException e ) { throw MESSAGES . vfsNotAvailable ( ) ; } final BootstrapImpl . FutureServiceContainer future = new BootstrapImpl . FutureServiceContainer ( container ) ; final ServiceTarget tracker = container . subTarget ( ) ; <START_BUG> final ControlledProcessState processState = new ControlledProcessState ( true ) ; <END_BUG> shutdownHook . setControlledProcessState ( processState ) ; ControlledProcessStateService . addService ( tracker , processState ) ; final Service < ? > applicationServerService = new ApplicationServerService ( extraServices , configuration , processState ) ; tracker . addService ( JBOSS_AS , applicationServerService ) . install ( ) ; final ServiceController < ? > rootService = container . getRequiredService ( JBOSS_AS ) ; rootService . addListener ( new org . jboss . msc . service . AbstractServiceListener < Object > ( ) { @ Override public void transition ( final ServiceController < ? > controller , final ServiceController . Transition transition ) { switch ( transition ) { case STARTING_to_UP : { controller . removeListener ( this ) ; final ServiceController < ? > controllerServiceController = controller . getServiceContainer ( ) . getRequiredService ( JBOSS_SERVER_CONTROLLER ) ; controllerServiceController . addListener ( new org . jboss . msc . service . AbstractServiceListener < Object > ( ) { public void transition ( final ServiceController < ? > controller , final ServiceController . Transition transition ) { switch ( transition ) { case STARTING_to_UP : { future . done ( ) ; controller . removeListener ( this ) ; break ; } case STARTING_to_START_FAILED : { future . failed ( controller . getStartException ( ) ) ; controller . removeListener ( this ) ; break ; } case REMOVING_to_REMOVED : { future . failed ( MESSAGES . serverControllerServiceRemoved ( ) ) ; controller . removeListener ( this ) ; break ; } } } } ) ; break ; } case STARTING_to_START_FAILED : { controller . removeListener ( this ) ; future . failed ( controller . getStartException ( ) ) ; break ; } case REMOVING_to_REMOVED : { controller . removeListener ( this ) ; future . failed ( MESSAGES . rootServiceRemoved ( ) ) ; break ; } } } } ) ; return future ; } @ Override @ SuppressWarnings ( "unchecked" ) public AsyncFuture < ServiceContainer > startup ( Configuration configuration , List < ServiceActivator > extraServices ) { } static class FutureServiceContainer extends AsyncFutureTask < ServiceContainer > { private final ServiceContainer container ; FutureServiceContainer ( final ServiceContainer container ) { } @ Override public void asyncCancel ( final boolean interruptionDesired ) { } void done ( ) { } void failed ( Throwable t ) { } } private static class ShutdownHook extends Thread { private boolean down ; private ControlledProcessState processState ; private ServiceContainer container ; private ServiceContainer register ( ) { } private synchronized void setControlledProcessState ( final ControlledProcessState ps ) { } @ Override public void run ( ) { } } }

Fix:
final ControlledProcessState processState = new ControlledProcessState ( configuration . getServerEnvironment ( ) . isStandalone ( ) ) ;