How to diagnose forked jcstress execution problems?

Aleksey Shipilev shade at redhat.com
Mon Mar 20 21:26:35 UTC 2017


On 03/20/2017 10:22 PM, Jerzy Krolak wrote:
> I recently broke something in a way that was not expected by jcstress and I had
> to debug the forked execution. I've eventually found what I did wrong, but that
> raised questions:
> 
> - is there an easy way to debug a forked execution, other than having two
> debuggers attached to two java processes?

"-f 0" will run the tests in "embedded mode". To reproduce the failure, you
would probably need to put all the VM options that jcstress usually passes to
forked VM -- that can be intercepted with regular OS tools.

> - what's the policy on using external dependencies in projects like jcstress /
> jmh? Are they constrained to absolute minimum due to Java 9, or could we add
> external libs for testing (eg. Mockito?)

Absolute minimum.

> - could we fix the EmbeddedExecutor class, so that it reports the whole
> stacktrace instead of "e.getMessage()"? I think that would be helpful.
> 
> If yes, I will be glad to send a patch for that,

Yes.

-Aleksey



More information about the jcstress-dev mailing list