[jetty-dev] Concurrency issue causing EnvConfiguration.configure to throw a NameNotFoundException; remaining name 'env'
I was able to reproduce that OOM by dropping the number of threads to 1 and letting it run for a while - Embarrassingly I wasn't shutting down the ExecutorService I was using to start the two servers in parallel. I've just pushed a change to github that addresses that and I now seem to be able to run it with one server-starting-thread indefinitely and still see the NameNotFoundException when starting the servers with multiple threads, so please give it another try if you can.
I've let it run for nearly 3mins and didn't get the problem, however I did get an OutOfMemoryException, so there's something not quite right with the test:
Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached at java.util.concurrent.FutureTask.report (FutureTask.java:122) at java.util.concurrent.FutureTask.get (FutureTask.java:191) at Main.main (Main.java:61) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297) at java.lang.Thread.run (Thread.java:834)
I think you should open an issue in the jetty issue tracker, and link to your repro on github and we'll take it from there. Be good if you took another look at the repro and fixed the OOM issue so we aren't muddying the waters.