mbari-org / vars-annotation

Video Annotation Application for MBARI's Media Management (M3) software stack
https://docs.mbari.org/vars-annotation/
Apache License 2.0
16 stars 6 forks source link

Since upgrade to Java 17, VARS experiences random, intermittent crashes #131

Closed hohonuuli closed 2 years ago

hohonuuli commented 2 years ago

This has been reported by both MBARI and DARC. It looks like this is due to a bug in the JVM, see https://bugs.openjdk.java.net/browse/JDK-8283386

hohonuuli commented 2 years ago

Screen shot from the video lab

Screen Shot 2022-03-08 at 08 32 34

hohonuuli commented 2 years ago

Discussion thread about this is on the openjfx mailing list

hohonuuli commented 2 years ago

This message was posted in the above thread:

All,

Thank you very much for all the comments/suggestions. I have been learning a lot about JVM C2 compilation the last couple of days.

BTW, in the meanwhile a similar bug has been reported with Debian Linux and has been added to https://bugs.openjdk.java.net/browse/JDK-828338 https://bugs.openjdk.java.net/browse/JDK-8283386.

I would like to briefly summarize what my solution is for the time being. Since in my case stability is much more important than speed I used a rather radical approach to prohibit C2 to do any aggressive optimization.

-XX:+TieredCompilation (enable C1)
-XX:TieredStopAtLevel=1 (disable C2)

It seems somewhat similar to the out-dated "-client" option. The application didn't really feel any slower. However, that certainly depends heavily on the use case.

Note: I very much look forward to the day the GraalVM compiler gets the default.

Hope this might be useful for others.

Thanks,

hohonuuli commented 2 years ago

@SarahRDBIngo Try out release 1.1.14 and see if it addresses the random crashes you were running into.

hohonuuli commented 2 years ago

The video lab at MBARI has reported that there are no longer any crashes with 1.1.14. Looks like disabling the C2 JIT compiler addressed the issue.