代码之家  ›  专栏  ›  技术社区  ›  einpoklum

NVIDIA Visual Profiler在启动时崩溃

  •  0
  • einpoklum  · 技术社区  · 2 年前

    我使用NVIDIA的Visual Profiler(nvvp)来评测Pascal GPU上的内核(如 aren't supported by Nsight Compute )-在Devuan GNU/Linux 4系统上使用CUDA 11.4。

    当我跑步时 nvvp ,它立即崩溃,并表示:

    $ nvvp
    java.lang.ExceptionInInitializerError
        at org.eclipse.osgi.storage.Storage.<init>(Storage.java:97)
        at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:84)
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
        at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
    Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @21bcffb5
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findMethod(FrameworkExtensionInstaller.java:52)
        at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findMethod(FrameworkExtensionInstaller.java:59)
        at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findAddURLMethod(FrameworkExtensionInstaller.java:43)
        at org.eclipse.osgi.storage.FrameworkExtensionInstaller.<clinit>(FrameworkExtensionInstaller.java:37)
        ... 14 more
    

    为什么会发生这种情况,以及如何规避/修复此错误?

    编辑 在我的系统上,默认的JAVA虚拟机是:openjdk 17 ea 2021-09-14。如果我使用不同的已安装vm,例如。 /usr/lib/jvm/java-11-openjdk-amd64/bin/java ,我得到了同样的错误。JDK来自 https://jdk.java.net/archive/ for Java 16也不会改变事情。正在添加 --illegal-access=permit 有人向我建议的——也无济于事。

    0 回复  |  直到 2 年前
        1
  •  1
  •   howlger df778899    2 年前

    这个 InaccessibleObjectException 似乎是由使用引起的 Java 17 以运行尚未为Java 17做好准备的Java代码。Java 17是 限制性更强 与以前的Java版本相比,在这一点上打破了向后兼容性。此外,Java 16比以前的版本更具限制性,并且在Java 11中缺少Java 8中存在的系统库包。

    代替Java 17, 使用Java 16或11 运行基于最新Eclipse版本的应用程序(具有 --add-modules=ALL-SYSTEM 在中 .ini 文件)和 Java 8 用于基于旧Eclipse版本的应用程序。

    .ini file next to the executable (having the same name) you can specify the Java to be used to run the Eclipse-based application 。或者,您可以将Java放入 jre 安装目录的子目录。

    此外,您可能会要求应用程序的供应商提供带有嵌入式Java的应用程序。

    使现代化 : Robert Crovella refers to the documentation ,根据 ​Visual Profiler requires Java 8 .