Buggy code:
public final class ServerStartTask implements ObjectInputValidation , Serializable , ServerTask { private static final long serialVersionUID = - 8505496119636153918L ; private final String serverName ; private final int portOffset ; private final List < ServiceActivator > startServices ; private final List < AbstractServerModelUpdate < ? > > updates ; private final ServerEnvironment providedEnvironment ; private static final Logger log = Logger . getLogger ( "org.jboss.as.server" ) ; public ServerStartTask ( final String serverName , final int portOffset , final List < ServiceActivator > startServices , final List < AbstractServerModelUpdate < ? > > updates ) { } public ServerStartTask ( final String serverName , final int portOffset , final List < ServiceActivator > startServices , final List < AbstractServerModelUpdate < ? > > updates , final ServerEnvironment environment ) { } public void run ( final List < ServiceActivator > startServices ) { MDC . put ( "process" , ( "server-" + ( serverName ) ) ) ; ServerStartTask . log . infof ( "Starting<seq2seq4repair_space>server<seq2seq4repair_space>\"%s\"" , serverName ) ; final ServiceContainer container = Factory . create ( ) ; final int threads = Runtime . getRuntime ( ) . availableProcessors ( ) ; container . setExecutor ( new ThreadPoolExecutor ( threads , threads , Long . MAX_VALUE , TimeUnit . NANOSECONDS , new LinkedBlockingQueue < Runnable > ( ) ) ) ; final ServerStartupListener serverStartupListener = new ServerStartupListener ( createListenerCallback ( ) ) ; final ServerStartBatchBuilder batchBuilder = new ServerStartBatchBuilder ( container . batchBuilder ( ) , serverStartupListener ) ; batchBuilder . addListener ( serverStartupListener ) ; final ServiceActivatorContext serviceActivatorContext = new ServiceActivatorContext ( ) { public BatchBuilder getBatchBuilder ( ) { return batchBuilder ; } } ; final BatchServiceBuilder < Void > builder = batchBuilder . addService ( JBOSS . append ( "as" , "server" ) , NULL ) ; <START_BUG> builder . setInitialMode ( IMMEDIATE ) ; <END_BUG> for ( ServiceActivator service : this . startServices ) { service . activate ( serviceActivatorContext ) ; } for ( ServiceActivator service : startServices ) { service . activate ( serviceActivatorContext ) ; } final ServerModel serverModel = new ServerModel ( serverName , portOffset ) ; final Properties systemProperties = System . getProperties ( ) ; final ServerEnvironment environment = ( ( providedEnvironment ) != null ) ? providedEnvironment : new ServerEnvironment ( systemProperties , serverName , false ) ; ServerStartTask . log . info ( "Activating<seq2seq4repair_space>core<seq2seq4repair_space>services" ) ; ServerEnvironmentServices . addServices ( environment , batchBuilder ) ; ServerDeploymentRepositoryImpl . addService ( batchBuilder ) ; ShutdownHandlerImpl . addService ( batchBuilder ) ; ServerModelService . addService ( serverModel , batchBuilder ) ; ServerDeploymentManagerImpl . addService ( serverModel , container , batchBuilder ) ; ServerConfigurationPersisterImpl . addService ( serverModel , batchBuilder ) ; batchBuilder . addService ( SOCKET_BINDING_MANAGER , new SocketBindingManagerService ( portOffset ) ) . setInitialMode ( ON_DEMAND ) ; batchBuilder . addService ( SERVICE_NAME , new ClassifyingModuleLoaderService ( ) ) ; final DeploymentModuleLoaderService deploymentModuleLoaderService = new DeploymentModuleLoaderService ( new DeploymentModuleLoaderImpl ( ) ) ; batchBuilder . addService ( DeploymentModuleLoaderService . SERVICE_NAME , deploymentModuleLoaderService ) . addDependency ( SERVICE_NAME , ClassifyingModuleLoaderService . class , new org . jboss . as . deployment . module . ClassifyingModuleLoaderInjector ( "deployment" , deploymentModuleLoaderService ) ) ; new JarDeploymentActivator ( ) . activate ( new ServiceActivatorContext ( ) { public BatchBuilder getBatchBuilder ( ) { return batchBuilder ; } } ) ; for ( AbstractServerModelUpdate < ? > update : updates ) { try { serverModel . update ( update ) ; } catch ( UpdateFailedException e ) { throw new IllegalStateException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>server" , e ) ; } } final UpdateContext context = new UpdateContext ( ) { public BatchBuilder getBatchBuilder ( ) { return batchBuilder ; } public ServiceContainer getServiceContainer ( ) { return container ; } } ; for ( AbstractServerModelUpdate < ? > update : updates ) { if ( ! ( update . isDeploymentUpdate ( ) ) ) { update . applyUpdateBootAction ( context ) ; } } try { serverStartupListener . startBatch ( createDeploymentTask ( container , serverStartupListener ) ) ; batchBuilder . install ( ) ; serverStartupListener . finishBatch ( ) ; } catch ( ServiceRegistryException e ) { throw new IllegalStateException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>install<seq2seq4repair_space>boot<seq2seq4repair_space>services" , e ) ; } } private Runnable createDeploymentTask ( final ServiceContainer container , final ServerStartupListener serverStartupListener ) { } Callback createListenerCallback ( ) { } public void validateObject ( ) throws InvalidObjectException { } private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } }

Fix:
builder . setInitialMode ( ACTIVE ) ;