org.terracotta.offheapstore.disk.paging.MappedPageSource.ASYNC_FLUSH_EXECUTOR
is an instance of org.terracotta.offheapstore.util.Retryer and owns an executor which is not shut down.
This is my ugly workaround:
Field retryerField = MappedPageSource.class.getDeclaredField("ASYNC_FLUSH_EXECUTOR");
retryerField.setAccessible(true);
Retryer retryer = (Retryer) retryerField.get(null);
Field executorField = Retryer.class.getDeclaredField("executor");
ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) executorField.get(retryer);
executor.shutdown();
Copied from ehcache/ehcache3#1444