Skip to content

Make IGV start on GraalVM 24.0.1 #11409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JaroslavTulach
Copy link
Contributor

I have problems launching IGV on GraalVM 24.0.1. It yields following error:

Executing: /bin/sh -c '/home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/application/target/idealgraphvisualizer/bin/idealgraphvisualizer' '--userdir' '/home/devel/NetBeansProjects/graalvm/graal/visualizer/IdealGraphVisualizer/application/target/userdir' '-J-Dnetbeans.logger.console=true' '-J-ea' '--branding' 'idealgraphvisualizer' '--jdkhome' '/home/devel/bin/graalvm-24'
WARNING: package com.sun.tools.javadoc.main not in jdk.javadoc
Error occurred during initialization of VM
java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
	at java.lang.System.initPhase3([email protected]/System.java:1947)

The problem is that JDK 24 has removed SecurityManager support and as the NetBeans Platform launcher needs to be adjusted to that. Such an adjustment has happened in NetBeans 26. Hence upgrading.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 14, 2025
@@ -117,7 +117,7 @@
<module>ViewerApi</module>
</modules>
<properties>
<netbeans.version>RELEASE220</netbeans.version>
<netbeans.version>RELEASE260</netbeans.version>
Copy link
Contributor Author

@JaroslavTulach JaroslavTulach Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change I can built regularly:

/graal/visualizer/IdealGraphVisualizer$ JAVA_HOME=/graalvm-21/ mvn install

and then execute on GraalVM 24.0.1 (which was failing previously):

/graal/visualizer/IdealGraphVisualizer$ JAVA_HOME=/graalvm-24 mvn -f application/ \
   -Dexec.vmArgs= -Dexec.appArgs= \
  nbm:cluster-app nbm:run-platform

@@ -45,7 +46,12 @@
public class GraphTypeModeSelector implements ModeSelector {
@Override
public Mode selectModeForOpen(TopComponent tc, Mode mode) {
if (tc.getLookup().lookup(InputGraph.class) == null) {
try {
if (tc.getLookup().lookup(InputGraph.class) == null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change I couldn't open any file in the editor. I was getting exception like this one

obrazek

@JaroslavTulach
Copy link
Contributor Author

JaroslavTulach commented Jun 15, 2025

@tkrodriguez: weird unit test failures when running them on 24b

  • building and running unit tests needs to be done on JDK21
  • looks like JDK24 increased the security checks again
  • and IGV modules can no longer access Graal code in the JDK
  • I haven't investigated any details, but probably some --add-opens or --add-exports when launching IGV would help

With following command line the execution gets further:

/graal/visualizer/IdealGraphVisualizer$ ./application/target/idealgraphvisualizer/bin/idealgraphvisualizer -J--add-exports=jdk.graal.compiler/jdk.graal.compiler.graphio.parsing.model=ALL-UNNAMED -J--add-exports=jdk.graal.compiler/jdk.graal.compiler.graphio.parsing=ALL-UNNAMED -J-Dnetbeans.logger.console=true --userdir ~/tmp/igvud3 --jdkhome ~/bin/graalvm/

why IGV needs to access graphio.parsing from a JDK and how you want to make sure it gets the right version on different JVMs, is beyond ambitions of this PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant