How should I stop the forked VM?

Behrooz Nobakht nobeh5 at gmail.com
Fri Jan 9 16:05:22 UTC 2015


Hi,

I am running JMH in a setup in which I bring up embedded Jetty/Jersey
applications in one thread in the forked VM and add shutdown hooks for the
forked VM. Now, when I run JMH benchmars:

- using fork = 1, when the benchmark is done, nothing happens (result
output) and it seems to waiting for some of the threads in the forked VM to
finished. I even tried to explicitly shutdown threads including
Jetty/Jersey.
- using fork = 0, JMH reaches to the point to print the results, but it
still it never finishes.

My hunch is that I have a bunch of ExectuorService instances on the forked
VM but I do not have explicit control over shutting them down. How should I
fix this issue?

Thanks,
Behrooz


More information about the jmh-dev mailing list