On Mon, 15 May 2023 12:31:49 GMT, Volker Simonis <simo...@openjdk.org> wrote:

> > Looks ok.
> > Is it practical to write a test for this situation? Can I assume you've 
> > validated the improvement as a remedy for the observed hangs?
> 
> I thought about a test but couldn't come up with a practical way to write it. 
> The JVM has to exit in the time frame after the `posix_spawn()` and before 
> `jspawnhelper` has read its data from the parent. In production this usually 
> happens due to memory constraints on the particular host which let the 
> OOM-killer kill the JVM process because it is the biggest memory consumer.
> 

A regression test would be good.

This can be very simply a runtime switch that kills the parent process at 
vulnerable times. See my example here:

https://github.com/openjdk/jdk/compare/master...tstuefe:jdk:test-for-parent-premature-death

Using that (KILLTEST=1), I was able to reproduce your problem with the hanging 
child. Using this to build a jtreg test is not hard.

Cheers, Thomas

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13956#issuecomment-1548113927

Reply via email to