Bug Timeout Java : problem since last update?

I agree with reviewing if the new Java version is making GC much worse than before (maybe it’s some config), but about the rest I just link a post that reCurse pasted some time ago: http://www.sirlin.net/articles/playing-to-win

Nothing stops you on learning C++ if you think it’s that good. I learned it only for CG. And I know many others are more Java/C# guys that use C++ only for the performance.

There is definitely an issue with Java. I’ll see that we investigate this change of behavior.
Same for the C/C++ stack issue.
I most probably won’t have any news before January.
(see that I didn’t specify which year… just kidding :smiley: )

4 Likes

The default one.

Good news, thanks! Happy hollidays, i hope this will be fixed in january.

About the C++ stack, yes, after the upgrade there are IDE timeouts, and I think runtime errors aren’t showing in many cases.
I have had many runtime error, with only a “Timeout” instead some hint about the problem. Hard to debug because in Visual Studio isn’t giving any issue.

1 Like

Same problem here for scala (runs on the JVM). I have a lot of random timeout in code that did not timeout before. I suppose that at some point there is a huge GC cycle that takes place, which was not happening before.

Edit:
Beyond timeout issues, scala also faces an issue where the program does not start at all. I had this on WW. I just tested with my GitC bot and it’s the same. I tried to launch my bot 10 times and no game actually started. This code was working before. :frowning:

Please help, coding game boys

2 Likes

I also have noticed the issue with Scala. My CSB bot held the 80thish position for a long time, but now it dropped to 160th and going down because every battle is lost because it times out, when it didn’t before, and no matter how ridiculously low computing time I set, it times out every single time. It just does not start at all. Hope this gets corrected soon because Scala is not an option (a viable one) right now in CodinGame, and I’ve used Scala for almost everything.

2 Likes

I also sincerely hope that scala gets fixed soon. I’ve worked a lot on my WW bot, but I can hardly test it in the arena with all the timeouts. I’m working locally currently, but I would love being able to use the arena again !

Update:

I believe there are two problems with scala:

  • The GC, which impacts all the JVM languages
  • Compiler timeout: it seems that if your code is too complex the compiler may take too long and your bot timeouts during the compilation phase. I tried with an older and simpler version and my bot starts almost every time. The scala compiler is known to be dead slow, and it didn’t improve with the most recent versions of the language. Maybe scala could be given a bit more compilation time ?

Scala compilation time has been increased (20s). More memory was granted for the compilation phase as well which improves compilation time.

Thanks !!! I’ll test this now :slight_smile:

About the Java timeout issues, we’re having issues reproducing the issue (we tried with @nmahoude code).

Could you point me to scenarios to always (frequently enough) get the issue ?

Today is a good day since we’ll release a fix for that stack trace issue in C/C++

2 Likes

Marvelous.

You can use my MeanMax code if you want to check and change the timeout margin to 6 ms instead of 20 currently to see a lot of timeout (at line 23).

static final int TIMEOUT_MARGIN = 6 * TO_NANO;

I’m really waiting that, right now tests are unusable due to the high amount of timeouts in almost all top bots…

My CSB bot, which used to work fine, doesn’t start at all anymore 100% of the times. Is that frequently enough? :wink:
Thanks!

1 Like

I’m flushing the output (System.out.flush()), and it minimize my timeouts

Hello @Monstruo,

Your issue was Scala related:

  1. Your code takes 20s to compile => it seems it was ok, but as our limit was 20s, I raised it to 25s just in case.
  2. Your scala code took too long to load (warm-up > 1s) so you failed at turn #1 => we implemented a different mechanism for Scala to account for the warm-up time.

As a result your code no longer fails.

2 Likes

¡Yay! ¡It seems everything is working now! I’m back at the top in CSB (well, not top really but 65th, but I’m happy with that)
I also had a bug in some of my bots that is related to the hardware change, but it’s completely my fault. I’m submitting everything again in order to recover my previous position.

One last question: Is there anything I should take into account about this warm-up time, or is it related only to the compiler?

Thanks again! :smiley: :smiley: :smiley: :smiley: :smiley:

Any news for the java timeouts problems?