JMH hangs between benchmarks (can't kill branched JVM?)

I have a large set of macrophins that measure the execution time of various simulations using different execution mechanisms (some of them are highly multithreaded). Most of these jobs use jmh parameters, which I specify in an abstract base class, like:

@ContextConfiguration(value = AbstractJobExecutorBenchmarker.CONTEXT_LOCATION)
@State(Scope.Benchmark)
@Fork(1)
@BenchmarkMode(Mode.SingleShotTime)
@Warmup(iterations = 1, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, timeUnit = TimeUnit.MILLISECONDS)
public abstract class AbstractJobExecutorBenchmarker extends AbstractTestNGSpringContextTests

(I also add -gc -si false to the command line)

When I run any of these tests or a small subset, everything works fine. However, if I try to run all of them at once (i.e., it does not have filtering options), jmh successfully completes several of them, and then unexpectedly frezees after one specific test ... all actions are performed for this, the final results are displayed but it doesn’t look like the forked JVM was killed, and the new one does not start, it seems that the whole process is stuck. Example of last printed statements:

Iteration   3: 03:59:52.059 [pool-8-thread-1] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.059 [pool-8-thread-3] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.060 [pool-8-thread-5] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.060 [pool-8-thread-6] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.061 [pool-8-thread-7] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.061 [pool-8-thread-8] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.061 [pool-8-thread-9] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.061 [pool-8-thread-10] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.062 [pool-8-thread-13] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.062 [pool-8-thread-14] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.063 [pool-8-thread-15] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.063 [pool-8-thread-18] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.063 [pool-8-thread-19] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.064 [pool-8-thread-20] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.064 [pool-8-thread-22] INFO  MessageTrafficController: Starting MessageTrafficController
03:59:52.065 [pool-8-thread-25] INFO  MessageTrafficController: Starting MessageTrafficController
04:00:57.600 [pool-8-thread-6] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.601 [pool-8-thread-7] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.604 [pool-8-thread-13] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.604 [pool-8-thread-10] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.603 [pool-8-thread-8] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.604 [pool-8-thread-9] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.606 [pool-8-thread-22] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.608 [pool-8-thread-25] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.606 [pool-8-thread-20] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.605 [pool-8-thread-15] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.606 [pool-8-thread-19] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.606 [pool-8-thread-18] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
04:00:57.604 [pool-8-thread-14] WARN  MessageTrafficController: Stopped due to class java.lang.InterruptedException
65598.920 ms

Result : 76749.529 Γ‚Δ…(99.9%) 804946.698 ms
  Statistics: (min, avg, max) = (39272.712, 76749.529, 125376.954), stdev = 44121.845
  Confidence interval (99.9%): [-728197.169, 881696.226]

If I destroy the forked JVM manually, the whole process is unlocked. However, after the end of the next test, he gets stuck again ... Any ideas why this is happening? And why does this NOT happen when I run the same test separately?

, - - JMH, forked, ?

+3
1

JMH dev: , , .. VM .

+2

All Articles