Skip to content
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

Provide os.arch platform name mapping for Linux s390x and zarch_64 #1388

Closed
MBaesken opened this issue Oct 13, 2021 · 3 comments
Closed

Provide os.arch platform name mapping for Linux s390x and zarch_64 #1388

MBaesken opened this issue Oct 13, 2021 · 3 comments

Comments

@MBaesken
Copy link

Provide complete information about the problem

  1. Version of JNA and related jars

jna-platform-5.9.0.jar

  1. Version and vendor of the java virtual machine

SAPJVM 8 on linux s390x

  1. Operating system

Linux s390x (issue is independent of distro, test run was on SLES)

  1. System architecture (CPU type, bitness of the JVM)

s390x also known as zarch_64 (64bit)

  1. Complete description of the problem

The SAPJVM8 JDK8 port on linux s390x unfortunately has system property os.arch == zArch_64 and not s390x.
This leads to an UnsatisfiedLinkError when running the Renaissance Java benchmark.
Probably adding a architecture name mapping might help to solve the issue , see

static String getCanonicalArchitecture(String arch, int platform) {

static String getCanonicalArchitecture(String arch, int platform) {
    arch = arch.toLowerCase().trim();
    if ("zarch_64".equals(arch)) {
        arch = "s390x";
    }
  1. Steps to reproduce

run the renaissance benchmark on Linux s390x, sub benchmark db-shootout
sapjvm_8/bin/java -jar renaissance-gpl-0.13.0-4-g2755c79.jar db-shootout

java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-zarch_64/libjnidispatch.so) not found in resource path
...
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1033)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:989)
at com.sun.jna.Native.(Native.java:195)
at net.openhft.chronicle.hash.impl.util.jna.PosixFallocate.(PosixFallocate.java:18)
at net.openhft.chronicle.hash.impl.VanillaChronicleHash.map(VanillaChronicleHash.java:977)
at net.openhft.chronicle.hash.impl.VanillaChronicleHash.createMappedStoreAndSegments(VanillaChronicleHash.java:485)
at net.openhft.chronicle.map.ChronicleMapBuilder.createWithNewFile(ChronicleMapBuilder.java:1748)
at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1652)
at net.openhft.chronicle.map.ChronicleMapBuilder.createPersistedTo(ChronicleMapBuilder.java:1552)
at org.lmdbjava.bench.Chronicle$CommonChronicleMap.setup(Chronicle.java:122)
at org.lmdbjava.bench.Chronicle$Reader.setup(Chronicle.java:204)
at org.renaissance.database.DbShootout.setUpBeforeAll(DbShootout.scala:65)
at org.renaissance.harness.ExecutionDriver.executeBenchmark(ExecutionDriver.java:82)
at org.renaissance.harness.RenaissanceSuite$.$anonfun$runBenchmarks$1(RenaissanceSuite.scala:140)
at org.renaissance.harness.RenaissanceSuite$.$anonfun$runBenchmarks$1$adapted(RenaissanceSuite.scala:136)
at scala.collection.immutable.List.foreach(List.scala:333)
at org.renaissance.harness.RenaissanceSuite$.runBenchmarks(RenaissanceSuite.scala:136)
at org.renaissance.harness.RenaissanceSuite$.main(RenaissanceSuite.scala:117)
at org.renaissance.harness.RenaissanceSuite.main(RenaissanceSuite.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.renaissance.core.Launcher.loadAndInvokeHarnessClass(Launcher.java:114)
at org.renaissance.core.Launcher.launchHarnessClass(Launcher.java:73)
at org.renaissance.core.Launcher.main(Launcher.java:37)

See also the issue renaissance-benchmarks/renaissance#296 (comment)
at the renaissance-benchmarks suite . There the renaissance-gpl-0.13.0-4-g2755c79.jar can be found .

@matthiasblaesing
Copy link
Member

Please test running the JVM with the system property jna.prefix set to linux-s390x that overrides the auto-detection (at least for library loading). If that works, I see no problem adding the special case.

@MBaesken
Copy link
Author

Please test running the JVM with the system property jna.prefix set to linux-s390x that overrides the auto-detection (at least for library loading). If that works, I see no problem adding the special case.

Hi Matthias, I can confirm that this works 👍

/linuxs390x/output/sapjvm_8/bin/java -Djna.prefix=linux-s390x -jar renaissance-gpl-0.13.0-4-g2755c79.jar db-shootout
====== db-shootout (database) [default], iteration 0 started ======
. . .

Thanks for the hint .

@matthiasblaesing
Copy link
Member

Fix was merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants