JDK-8213948 : Solaris-X64 build fails with compact hashtable
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: x86_64
  • Submitted: 2018-11-15
  • Updated: 2018-11-22
  • Resolved: 2018-11-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b21Fixed
Related Reports
Relates :  
Description
Undefined                       first referenced
 symbol                             in file
__type_0 read_value_from_compact_hashtable<const ArchivedKlassSubGraphInfoRecord*>(unsigned char*,unsigned) /work/shared/mirrors/src_clones/jdk/jdk_baseline/build/solaris-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/heapShared.o
__type_0 read_value_from_compact_hashtable<Symbol*>(unsigned char*,unsigned) /work/shared/mirrors/src_clones/jdk/jdk_baseline/build/solaris-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/symbolTable.o
__type_0 read_value_from_compact_hashtable<const RunTimeSharedClassInfo*>(unsigned char*,unsigned) /work/shared/mirrors/src_clones/jdk/jdk_baseline/build/solaris-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/systemDictionaryShared.o
ld: fatal: symbol referencing errors
lib/CompileJvm.gmk:172: recipe for target '/work/shared/mirrors/src_clones/jdk/jdk_baseline/build/solaris-x86_64-normal-server-release/support/modules_libs/java.base/server/libjvm.so' failed
make[3]: *** [/work/shared/mirrors/src_clones/jdk/jdk_baseline/build/solaris-x86_64-normal-server-release/support/modules_libs/java.base/server/libjvm.so] Error 1
make[3]: *** Waiting for unfinished jobs....
Comments
I'm testing out the fix now in the repo I used to isolate the problem. Update: Sorry for the delay... I'm running Thread-SMR stress testing on that machine so the build is slow (but is adding more stress to the run!!). My two T7600's run stress testing from mid-Thu -> mid-Sun which gives me about 72 hours of stress testing results on each weekly snapshot... Update: Of course, the build finished right after I added the above comment. The incremental release build is happy! I'm going to assume that fastdebug and slowdebug will be equally happy.
16-11-2018

BTW, I could get the internal devkit to work by reverting this changeset http://hg.openjdk.java.net/jdk/jdk/rev/b091b768fea4 (JDK-8213569: Bump minimum boot jdk to JDK 11). I was able to build hotspot. I didn't try any further. $ bash jib.sh configure -- --disable-warnings-as-errors $ bash jib.sh make -- hotspot $ ls -l build/solaris-x64/jdk/lib/server/libjvm.so -rwxr-xr-x 1 iklam dba 91485616 Nov 16 17:56 build/solaris-x64/jdk/lib/server/libjvm.so
16-11-2018

BTW, the original error seems to be related by this linker flag "-Wl,-z,defs". If I remove this flag, then the "undefine read_value_from_compact_hashtable" errors are gone.
16-11-2018

[~dcubed] I couldn't get Solaris Studio Compiler to work, but I did get a successful build of libjvm.so with devkit-solaris_x64/SS12u4-Solaris11u1+1.0 using the following patch. Could you try? Thanks! diff -r 06fdb8783d51 src/hotspot/share/classfile/compactHashtable.hpp --- a/src/hotspot/share/classfile/compactHashtable.hpp Wed Nov 14 16:27:11 2018 -0800 +++ b/src/hotspot/share/classfile/compactHashtable.hpp Fri Nov 16 17:56:47 2018 +0000 @@ -330,7 +330,7 @@ // offset from the CDS base address. template <typename V> -V read_value_from_compact_hashtable(address base_address, u4 offset) { +inline V read_value_from_compact_hashtable(address base_address, u4 offset) { return (V)(base_address + offset); }
16-11-2018

I confirmed that a repo baselined at this changeset builds: [/work/shared/bug_hunt/thread_SMR_stress/jdk12_exp/open]: changeset: 52513:d4f3e37d1fda tag: qparent user: dholmes date: Tue Nov 13 21:43:10 2018 -0500 summary: 8213826: Disable ARMv6 memory barriers on ARMv5 processors That confirms that JDK-8213346 is the cause of the build breakage.
16-11-2018

This seems likely to be a C++ template issue. IIRC Solaris x64 is using an older Solaris Studio Compiler version than SPARC due to the devkit issues.
15-11-2018

Ioi, can you take a look at this build failure?
15-11-2018

The obvious addition of missing include files didn't help: $ hg diff src/hotspot/share/classfile/systemDictionaryShared.cpp src/hotspot/share/memory/heapShared.cpp diff -r 8fffe44e0400 src/hotspot/share/classfile/systemDictionaryShared.cpp --- a/src/hotspot/share/classfile/systemDictionaryShared.cpp Thu Nov 15 01:58:53 2018 +0100 +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp Thu Nov 15 12:02:11 2018 -0500 @@ -29,6 +29,7 @@ #include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderDataGraph.hpp" #include "classfile/classLoaderExt.hpp" +#include "classfile/compactHashtable.hpp" #include "classfile/dictionary.hpp" #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" diff -r 8fffe44e0400 src/hotspot/share/memory/heapShared.cpp --- a/src/hotspot/share/memory/heapShared.cpp Thu Nov 15 01:58:53 2018 +0100 +++ b/src/hotspot/share/memory/heapShared.cpp Thu Nov 15 12:02:11 2018 -0500 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/compactHashtable.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp"
15-11-2018

This appears to be related to the following changeset: Changeset: f4e3900c8d08 Author: iklam Date: 2018-11-07 19:40 -0800 URL: http://hg.openjdk.java.net/jdk/jdk/rev/f4e3900c8d08 8213346: Re-implement shared dictionary using CompactHashtable Reviewed-by: jiangli Adding Ioi and Jiangli to this bug...
15-11-2018