Created attachment 164087 [details] Java Stacktrace While trying to port Facebook's Presto (https://prestodb.io/) to FreeBSD 10.2, I got the following exception (running openjdk8-8.60.24_1): javax.management.RuntimeErrorException: java.lang.UnsatisfiedLinkError: sun.management.OperatingSystemImpl.getSystemCpuLoad()D (Stacktrace is attached) Could this be an OpenJDK bug?
(In reply to Tobias Feldhaus from comment #0) > Could this be an OpenJDK bug? It is one of unimplemented features for BSD platforms.
(In reply to Jung-uk Kim from comment #1) So there is no way to make software work that uses com.sun.jmx.mbeanserver.JmxMBeanServer as this is dependent on this method?
(In reply to Tobias Feldhaus from comment #2) > So there is no way to make software work that uses > com.sun.jmx.mbeanserver.JmxMBeanServer as this is dependent on this method? Correct, at least for now.
A commit references this bug: Author: glewis Date: Sat Jan 2 09:30:21 UTC 2016 New revision: 405058 URL: https://svnweb.freebsd.org/changeset/ports/405058 Log: . Stub implementation of OperatingSystemImpl. PR: 205229 Changes: head/java/openjdk8/Makefile head/java/openjdk8/files/patch-jdk-src-solaris-native-sun-management-BsdOperatingSystem.c
Created attachment 165000 [details] stacktrace for new crash with build 1.8.0_66-b17
With newest OpenJDK version from the Ports tree the build fails with an Internal Error (os_bsd.cpp:4321). See new Attachment (OpenJDK Runtime Environment (8.0_66-b17) (build 1.8.0_66-b17). ports r405058
Assign to committer that .. committed/resolved @Tobias, please create a new issue for the build regression please, adding this issue (bug 205229) to the See Also: field
This issue can be closed now. The regression (reported in comment 6) is being tracked in bug 205843
The issue should stay open. All my commit did was correctly indicate that these functions are unimplemented on FreeBSD. I've closed 205843 as working as intended. This stays open to track that they are unimplemented and that we need to come up with an implementation.
If you want to get Presto working, then alter the patch I committed last time to return 0 instead of -1. -1 indicates the feature is unimplemented (which is true). 0 will mean you get garbage data but the feature will be detected as implemented.
Thanks Greg, however, even when I alter the patch to return 0 instead of -1 and do an uninstall - clean - reinstall, the Stacktrace stays almost the same. (See new stacktrace.)
Created attachment 165095 [details] Stacktrace of selfpatched build that returns 0 instead of -1
Your stack trace shows it has nothing to do with the original PR. Actually, the crash is related to Bug 205523.
A commit references this bug: Author: jkim Date: Wed Jan 13 18:13:57 UTC 2016 New revision: 406064 URL: https://svnweb.freebsd.org/changeset/ports/406064 Log: MFH: r405058, r405320 - Stub implementation of OperatingSystemImpl. - Partially implement getThreadUserTime() using getrusage(2). Note we can only get usage for the current thread. Return -1 if the requested function is not supported, i.e., user time for other threads, rather than crash. - Properly implement os::elapsedVTime() using getrusage(). Basically, it is taken from Linux version. - Temporarily revert r403748 to fix bootstrapping with earlier OpenJDK8. PR: 205229, 205523, 205544, 205843 Approved by: ports-secteam (feld) Changes: _U branches/2016Q1/ branches/2016Q1/java/openjdk8/Makefile branches/2016Q1/java/openjdk8/files/patch-hotspot_src_os_bsd_vm_os__bsd.cpp branches/2016Q1/java/openjdk8/files/patch-jdk-src-solaris-native-sun-management-BsdOperatingSystem.c
Forgotten to close?
Is there a plan to implement this feature in FreeBSD. I am using pinpoint and there are no CPU data. At the logs, I see cpuLoad:TCpuLoad(jvmCpuLoad:-1.0, systemCpuLoad:-1.0). I would rather see the java exception instead of -1.