Problem upgrading from OpenJDK 17 to OpenJDK 21 on Debian 13.

27 views
Skip to first unread message

Cristiano Silva

unread,
Oct 29, 2025, 12:48:20 PM (8 days ago) Oct 29
to Jaamsim Users Discussion Group
Hello Mr. Dr. Harry King and Mr. Harvey Harrison.

After updating my computer to Debian 13, I started experiencing some problems with JaamSim.

Debian 13 has OpenJDK 21 and OpenJDK 25 in its repository.

I encountered this problem with both: OpenJDK 21 and OpenJDK 25.

With OpenJDK 17, I didn't encounter this problem; it has been working normally.

However, I would like to use JaamSim with OpenJDK 21 or OpenJDK 25.

While researching, I found the following information:

Why OpenJDK 17 works better:
- More Permissive Security Model: Still has partial support for the old model;
- JOGL Compatibility: It was tested and developed for JDK 8-17;
- Gradual Transition: Restrictions were less rigorous;

Possible Permanent Solutions:
- Update JOGL dependencies to versions compatible with JDK 21+;
- Use --enable-native-access in the launch script;
- Modularize the application to declare native dependencies;
- Migrate to modern alternatives like LWJGL3;

The "WARNING" about restricted methods masks a deeper problem: when the native library is not fully loaded, any subsequent graphics operation attempts to access uninitialized memory, causing a SIGSEGV.
- More secure and restrictive Java
- Outdated legacy libraries
- Access to native resources without explicit permissions
Update JaamSim to JDK 21+.

I don't know if this information I found online solves the problem I started encountering with OpenJDK 21 onwards; I only sent it for your analysis.

Thank you very much!

The log file that is generated is empty, with 0kb. Below is the error that is returned (in the terminal) when I try to open a file and JaamSim closes abruptly.

$ java -jar JaamSim2025-08.jar
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.jogamp.common.jvm.JNILibLoaderBase in an unnamed module (file:/home/cristianoltfs/Downloads/JaamSim2025-08.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f51400505d0, pid=19051, tid=19208
#
# JRE version: OpenJDK Runtime Environment (25.0.1+8) (build 25.0.1+8-Debian-1deb13u1)
# Java VM: OpenJDK 64-Bit Server VM (25.0.1+8-Debian-1deb13u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  0x00007f51400505d0
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/cristianoltfs/Downloads/hs_err_pid19051.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.debian.org/openjdk-25
#
Abortado

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Harvey Harrison

unread,
Oct 29, 2025, 1:15:54 PM (8 days ago) Oct 29
to Cristiano Silva, Jaamsim Users Discussion Group
I had the version sitting around to suppress the enable native warning
and just never did a release. v2025-09 has been pushed out today to
deal with that part.

The segfault is unexpected, but our current JOGL version was testing
and validated with Java 25 releases, hopefully you have better luck
getting a log file out of this version so we can see where this might
be failing. I'm running java 17, 21 and 25 here for testing. But not a
debian system in the mix I'm afraid. ANy chance you could try a build
from adoptium to see if it may just be an issue with the debian build
of OpenJDK?

Harvey
> --
> You received this message because you are subscribed to the Google Groups "JaamSim Users Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jaamsim-user...@googlegroups.com.
> To view this discussion, visit https://groups.google.com/d/msgid/jaamsim-users/CAJ7TUjrWcvDr1M06Gqd8Zj7QinoHzB11XrNn%3D-qsOtrtXx7ZwA%40mail.gmail.com.

Cristiano Silva

unread,
Oct 29, 2025, 2:17:15 PM (8 days ago) Oct 29
to Harvey Harrison, Jaamsim Users Discussion Group
Thank you very much for the suggestion.

I ran version 2025-9, I'm attaching the log file, it might contain more details about the problem.

I will try with Adoptium.

Thank you very much, Mr. Harvey Harrison.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

hs_err_pid28815.log

Cristiano Silva

unread,
Oct 29, 2025, 2:40:37 PM (8 days ago) Oct 29
to Harvey Harrison, Jaamsim Users Discussion Group
I installed Adoptium, I will send a video and a log next.

I'm attaching a video.

The problem usually occurs when I close and then try to open the file again immediately.

In the video, I tried it several times; some attempts worked, others didn't.


Thank you very much, Mr. Harvey Harrison.


Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

On Wed, Oct 29, 2025 at 2:15 PM Harvey Harrison <harvey....@gmail.com> wrote:
hs_err_pid33600.log

Harvey Harrison

unread,
Oct 29, 2025, 3:57:06 PM (8 days ago) Oct 29
to Cristiano Silva, Jaamsim Users Discussion Group
Hmm, these are all the same as your previous crashes rendering the skybox, I do wonder if there's a race condition somewhere in either jaamsim or in the OpenGL driver on your machine. I'll take a look through that pathway to see if anything stands out.

Harvey

Cristiano Silva

unread,
Oct 29, 2025, 4:07:15 PM (8 days ago) Oct 29
to Harvey Harrison, Jaamsim Users Discussion Group
Thank you very much, Mr. Harvey Harrison.

I'm doing some research here.

It worked when I ran it with the following parameters:

$ java --enable-native-access=ALL-UNNAMED
-Djava.util.concurrent.ForkJoinPool.common.parallelism=1
-Djava.awt.robot.singleThread=true
-XX:ActiveProcessorCount=1
-jar JaamSim2025-09.jar

The problem may be due to race conditions in the JaamSim code that only appear in:

--> Java 21+ (different thread scheduler)
--> Debian 13 (different execution timing)
--> Multi-core systems

I don't know if that could be it.


Thank you very much, Mr. Harvey Harrison.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Cristiano Silva

unread,
Oct 30, 2025, 5:39:32 AM (8 days ago) Oct 30
to Harvey Harrison, Jaamsim Users Discussion Group
By running with these parameters, this problem no longer occurred:

java --enable-native-access=ALL-UNNAMED
-Djava.util.concurrent.ForkJoinPool.common.parallelism=1
-Djava.awt.robot.singleThread=true
-XX:ActiveProcessorCount=1
-jar JaamSim2025-09.jar

--> With these parameters, it ran without this problem.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Harvey Harrison

unread,
Oct 30, 2025, 1:05:02 PM (7 days ago) Oct 30
to Cristiano Silva, Jaamsim Users Discussion Group
I appreciate the extra testing and that you have a temporary workaround. I'll be looking through the renderer pathways and try to isolate if there is a race condition on the JaamSim side, or if it is potentially an issue in the OpenGL library on your machine. I don't know that I'll have anything immediately available for you to test, but will reach out if I have any additional debug versions for you to test to try and gather a bit more information.

Thanks again for all the testing!

Harvey

Cristiano Silva

unread,
Oct 30, 2025, 2:59:31 PM (7 days ago) Oct 30
to Harvey Harrison, Jaamsim Users Discussion Group
Thank you, Mr. Harvey Harrison, for your attention.

I am available to take the tests.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Reply all
Reply to author
Forward
0 new messages