cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

debugging and HOPEX process stuck during Eclipse debugging session

pgarnier
MEGA
MEGA

debugging and HOPEX process stuck during Eclipse debugging session

The issue : the debugger freezes in Eclipse while debugging HOPEX remotely, where the JVM also becomes stuck. This type of freeze can occur for several reasons, particularly related to JNI (Java Native Interface) interoperability between the JVM and the debugger in remote debugging scenarios.

Observed Symptoms:

  1. The Eclipse debugger becomes unresponsive (unable to step over or continue the code).
  2. When you try to stop the debugger, it does not terminate.
  3. The HOPEX process remains stuck, and the JVM seems to be in a suspended state.
  4. The inspection tool shows variables as "pending," and debugging no longer progresses.

Suggested Solution:

Add the -Xcheck:jni:nonfatal option to the JVM.

This option aims to ignore errors related to JNI interoperability, which could be causing freezes in the remote debugger. Specifically, certain JNI errors occurring during the execution of your program could be fatal and cause issues with debugging. The -Xcheck:jni:nonfatal option treats these errors as non-fatal, thus preventing these freezes.

Explanation:

When debugging a Java application remotely, the process may encounter synchronization or interoperability issues between the JVM and the debugger, particularly in relation to JNI (Java Native Interface) calls. If errors occur in this domain, they can block the debugger, preventing variable inspection or code progression.

The -Xcheck:jni:nonfatal option helps to bypass these JNI errors by handling them in a non-fatal way, which should allow the debugger to function normally without being stuck.

How to Use the Option:

You can add this option to the VM Arguments:

pgarnier_1-1734533472743.png

 

 

Other Considerations:

  • Alternative IDEs: As mentioned, other environments like IntelliJ IDEA or Visual Studio Code (VSCode) might not encounter this issue, as they could handle JNI interactions differently. If the problem persists after applying the solution, you could try using another IDE to see if the issue continues.
  • Further Checks: If the option doesn't completely resolve the issue, it may be helpful to check the Eclipse or JVM logs for other errors or warnings related to JNI or communication between the JVM and the debugger.

 

0 Replies