Java - Random timeouts due to

Ok my head is spinning…

What I see is that by commenting out the System.err.println lines from @Tiramon code, the code no longer times out.

@ThomasNicoullaud Would be good to test your code without any System.err (in case you have some debug in your code). Either it solves the problem too and we have at least one lead. Or it does not solve anything and what I see with @Tiramon code is due to something else to be found…

Still, I can reproduce with @SuperNit code, so still investigating.

No change for me, timeout 90% of test run.
(You can try my CR Code. Just put debug var to false line 434).

Thomas

Same problem for me with Ultimate Tic Tac Toe.
Several timeout checks inside my code, with System.err.println time that exceed the timeout. Each timeout exceeded immediatly quit the method (return).

I have many System.err.println about this timeouts, without any code between them (except method return), and i’ve already experiment (random) deltas above 40~50ms.

Trying to optimize my code to avoid a maximum of garbage collected objects, quite complicated with Monte Carlo TS :disappointed_relieved:

PS : sorry for my english :wink:

1 Like

I added GC notifications on my GitC code that timeouts everytime, and I had 0 notifications. The code just seems to run much slower than before.

Same problem with Code of Kutulu…
Light code with only parameters reading and a few very simple distances calculation, random timeout.

Appearing that timeout becomes systematic with one “System.err.println(…)”

1 Like

Can you simply rollback @_CG_XorMode ? It seems that the new version is much worse than the old one for everyone. There is no reason to keep it in this condition.

1 Like

Indeed. On Code à la Mode, my code is timing out for all matches now although I had no such issue before on this game…

1 Like

@CG Also to validate that timeouts are due to GC you can test by setting Epsilon-GC (experimental in Java 11).

Any news here?

2 Likes

Just tried in Code A La Mode.
No timeouts in 10 games with commented err output

but a real simple bot in CultistWars wastes time while calling a method.
err output was just added afterwards to locate the time waster

timestamp before method call and first line in method is 70ms apart …

Couldn’t find the 70ms again
and sometimes id don’t even reach the method call

in this game it is 60ms vanishing

We’ll fallback to Java 8 tomorrow. We’ll continue to investigate so we can finally go back to Java 11 at some point.

8 Likes

Java is still unuseable. Have you done a specific change two weeks ago?

2 Likes

I think they didn’t revert so far, System.getProperty(“java.version”) still reports version=11.0.2

Indeed, we had an other issue preventing us from doing the fallback. We’ll migrate back to Java 8 today.

1 Like

We reverted to Java 8 for all JVM based languages (except for non-Multiplayer Java)

3 Likes

I’m unsure. Solo/CoC puzzles are still in java 11 ?

Back to Java 8 yesturday, no more problem in any game for me !

Let’s un-comment sys errs (⌐■_■)

Yeah! My timeout problems are gone, thank you.

I just resubmitted my Clojure player for Code a la Mode and the timeouts are still occurring. :anguished:

Same for me. My code for “Code à la mode” reached Gold league without issues, then it started to time out a few days before the Legend league opens and it still times out. I didn’t investigate further.

On “Bit Runner 2048”, my code has to reply within 5ms to avoid any timeout (and it is not a guarantee).