### Elasticsearch Version

8.6.0-SNAPSHOT

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

N/A

### Problem Description

We see 8.6.0 master nodes (512MB heap) repeatedly dying with OOME when attempting to do a snapshot with GCS snapshot repository. This is not reproducible with prior versions and we suspect that this is caused by https://github.com/elastic/elasticsearch/pull/90282.

### Steps to Reproduce

1. Start a cluster in a containerized environment; master nodes have 1GB of memory, 512MB of heap
2. Setup a GCS snapshot repository
3. Create a snapshot of the cluster.
4. The master node will OOM with the following message:

```
[5383.050s][warning][gc,alloc] elasticsearch[i6][snapshot][T#26]: Retried waiting for GCLocker too often allocating 256 words
[5383.053s][warning][gc,alloc] elasticsearch[i6][snapshot][T#14]: Retried waiting for GCLocker too often allocating 1029 words
java.lang.OutOfMemoryError: Java heap space
```

### Logs (if relevant)

_No response_
server/src/main/java/org/elasticsearch/threadpool/ThreadPool.java
}
        this.builders = Collections.unmodifiableMap(builders);
        threadContext = new ThreadContext(settings);
        final Map<String, ExecutorHolder> executors = new HashMap<>();
        for (final Map.Entry<String, ExecutorBuilder> entry : builders.entrySet()) {
            final ExecutorBuilder.ExecutorSettings executorSettings = entry.getValue().getSettings(settings);
            final ExecutorHolder executorHolder = entry.getValue().build(executorSettings, threadContext);
            if (executors.containsKey(executorHolder.info.getName())) {
                throw new IllegalStateException("duplicate executors with name [" + executorHolder.info.getName() + "] registered");
            }
            logger.debug("created thread pool: {}", entry.getValue().formatInfo(executorHolder.info));
            executors.put(entry.getKey(), executorHolder);
        }
        executors.put(Names.SAME, new ExecutorHolder(EsExecutors.DIRECT_EXECUTOR_SERVICE, new Info(Names.SAME, ThreadPoolType.DIRECT)));
        this.executors = Map.copyOf(executors);
        final List<Info> infos = executors.values()
            .stream()
            .filter(holder -> holder.info.getName().equals("same") == false)
            .map(holder -> holder.info)
            .toList();
        this.threadPoolInfo = new ThreadPoolInfo(infos);
        this.scheduler = Scheduler.initScheduler(settings, "scheduler");
        this.slowSchedulerWarnThresholdNanos = SLOW_SCHEDULER_TASK_WARN_THRESHOLD_SETTING.get(settings).nanos();
        this.cachedTimeThread = new CachedTimeThread(
            EsExecutors.threadName(settings, "[timer]"),
            ESTIMATED_TIME_INTERVAL_SETTING.get(settings).millis(),
            LATE_TIME_INTERVAL_WARN_THRESHOLD_SETTING.get(settings).millis()
        );
        this.cachedTimeThread.start();
    }