Bug 1276959 - OpenJDK8 is ftbfs on ppc64*
OpenJDK8 is ftbfs on ppc64*
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
:
Depends On:
Blocks: PPCTracker
  Show dependency treegraph
 
Reported: 2015-11-01 13:20 EST by Peter Robinson
Modified: 2015-11-03 06:34 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-03 06:34:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Robinson 2015-11-01 13:20:18 EST
java-1.8.0-openjdk-1.8.0.60-15.b28.fc24 is FTBFS on both ppc64 and ppc64le

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2860644

Not sure why TARGET_ARCH_MODEL_aarch64 is an issue, same error on both:

+ /usr/bin/g++ -DLINUX -D_GNU_SOURCE -DPPC64 -DPRODUCT -I. -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/prims -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/precompiled -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/cpu/ppc/vm -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/os_cpu/linux_ppc/vm -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/os/linux/vm -I/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/os/posix/vm -I../generated '-DHOTSPOT_RELEASE_VERSION="25.60-b23"' '-DHOTSPOT_BUILD_TARGET="product"' '-DHOTSPOT_BUILD_USER="mockbuild"' '-DHOTSPOT_LIB_ARCH="ppc64le"' '-DHOTSPOT_VM_DISTRO="OpenJDK"' -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_linux_ppc -DTARGET_OS_ARCH_MODEL_linux_ppc_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -fno-strict-aliasing -g -fno-omit-frame-pointer -O3 -D_LP64=1 -DVM_LITTLE_ENDIAN -DABI_ELFv2 -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string -Werror -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -fstack-protector-strong -fno-devirtualize -fno-tree-vectorize -fno-strict-aliasing -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch
In file included from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp:28:0,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp:29,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp:30,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/prims/methodHandles.hpp:30,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciMethod.hpp:33,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/code/debugInfoRec.hpp:30,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciEnv.hpp:31,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciUtilities.hpp:28,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciNullObject.hpp:30,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciConstant.hpp:29,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/ci/ciArray.hpp:29,
                 from /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:33:
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp:37:7: error: "TARGET_ARCH_MODEL_aarch64" is not defined [-Werror=undef]
 #elif TARGET_ARCH_MODEL_aarch64
       ^
cc1plus: all warnings being treated as errors
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/hotspot/make/linux/makefiles/vm.make:361: recipe for target 'precompiled.hpp.gch' failed
gmake[6]: Leaving directory '/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.60-15.b28.fc24.ppc64le/openjdk/build/jdk8.build/hotspot/linux_ppc64_compiler2/product'
Comment 1 jiri vanek 2015-11-02 09:45:04 EST
Yes, integration forest used in f24 have different abstractinterpreter.hpp then "notrmal" forest used for  f23 and older. But same as aarch64 forest used for f23 and older. 

integration forest for f24, aarch64 forest for f23 and older:
#if defined INTERP_MASM_MD_HPP
# include INTERP_MASM_MD_HPP
#elif defined TARGET_ARCH_x86
# include "interp_masm_x86.hpp"
#elif TARGET_ARCH_MODEL_aarch64
# include "interp_masm_aarch64.hpp"
#elif defined TARGET_ARCH_MODEL_sparc
# include "interp_masm_sparc.hpp"
#elif defined TARGET_ARCH_MODEL_zero
# include "interp_masm_zero.hpp"
#elif defined TARGET_ARCH_MODEL_ppc_64
# include "interp_masm_ppc_64.hpp"
#endif


normal forst for f23 and older:
#if defined INTERP_MASM_MD_HPP
# include INTERP_MASM_MD_HPP
#elif defined TARGET_ARCH_x86
# include "interp_masm_x86.hpp"
#elif defined TARGET_ARCH_MODEL_sparc
# include "interp_masm_sparc.hpp"
#elif defined TARGET_ARCH_MODEL_zero
# include "interp_masm_zero.hpp"
#elif defined TARGET_ARCH_MODEL_ppc_64
# include "interp_masm_ppc_64.hpp"
#endif
Comment 2 Andrew Dinn 2015-11-02 09:47:14 EST
This looks like the result of a bad merge into the 8u60 tree. The test ought to be

#elif defined TARGET_ARCH_MODEL_aarch64.

I suspect this only manifests when building ppc because the #elif case for ppc comes after this one. So, when building on AArch64 we reach this elif but this symbol is defined; when building on x86 we don't reach this elif.

The immediate fix is to change the test as detailed above. That said, I don't know how this tree was built from upstream. Andrew Hughes may have a better idea of where this error came from and how to avoid it in future -- or indeed how to correct the immediate problem.
Comment 3 Andrew Haley 2015-11-02 09:53:48 EST
We're overthinking this.  Please test this fix:

diff --git a/src/share/vm/interpreter/abstractInterpreter.hpp b/src/share/vm/interpreter/abstractInterpreter.hpp
--- a/src/share/vm/interpreter/abstractInterpreter.hpp
+++ b/src/share/vm/interpreter/abstractInterpreter.hpp
@@ -34,7 +34,7 @@
 # include INTERP_MASM_MD_HPP
 #elif defined TARGET_ARCH_x86
 # include "interp_masm_x86.hpp"
-#elif TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
 # include "interp_masm_aarch64.hpp"
 #elif defined TARGET_ARCH_MODEL_sparc
 # include "interp_masm_sparc.hpp"
Comment 4 jiri vanek 2015-11-02 10:09:59 EST
Surprisingly, abstractInterpreter is th eonly file with this bug:

jdk8/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp:#elif TARGET_ARCH_MODEL_aarch64
jdk8/hotspot/src/share/vm/interpreter/templateTable.hpp:#elif defined TARGET_ARCH_MODEL_aarch64
jdk8/hotspot/src/share/vm/interpreter/templateTable.hpp:#elif defined TARGET_ARCH_MODEL_aarch64
....

So not bad marge, but bug  in both aarch64 forest and in integration forest.
Comment 6 Andrew Haley 2015-11-02 10:26:46 EST
(In reply to jiri vanek from comment #4)
> Surprisingly, abstractInterpreter is th eonly file with this bug:
> 
> jdk8/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp:#elif
> TARGET_ARCH_MODEL_aarch64
> jdk8/hotspot/src/share/vm/interpreter/templateTable.hpp:#elif defined
> TARGET_ARCH_MODEL_aarch64
> jdk8/hotspot/src/share/vm/interpreter/templateTable.hpp:#elif defined
> TARGET_ARCH_MODEL_aarch64
> ....
> 
> So not bad marge, but bug  in both aarch64 forest and in integration forest.

Good, thanks.  Don't forget to send that patch upstream.
Comment 7 Andrew Dinn 2015-11-02 10:46:13 EST
I don't believe Jiri's comment is correct:

The code in

  aarch64-port/jdk8/..../abstractInterpreter.h

has always used a sequence like this 

#ifdef TARGET_ARCH_MODEL_xxx
...
#endif
#ifdef TARGET_ARCH_MODEL_yyy
...
#endif

since it was first written.

The problem is an error in the code in

  aarch64-port/jdk8u/..../abstractInterpreter.h

which uses the cascade of #if defined ... #elif defined ...
Comment 8 Andrew John Hughes 2015-11-02 11:58:09 EST
The error comes from:

changeset:   8561:ff13d8140756
user:        enevill
date:        Mon Sep 14 21:40:39 2015 +0000
summary:     Fix mismerge when merging up to jdk8u60-b21


-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif TARGET_ARCH_MODEL_aarch64
 # include "interp_masm_aarch64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
 # include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero

Clearly wrong in this context.

I'm not sure what tree is being built here - Comment 1 mentions u60, while we should be on u65 - but I'll check all three AArch64 trees - 8, 8u, 8u60 - and check it's gone.
Comment 9 Peter Robinson 2015-11-02 12:03:45 EST
This is on ppc*

It's the auto running of koji-shadow
Comment 10 Andrew John Hughes 2015-11-02 12:21:42 EST
Fixed in 8u60:

http://hg.openjdk.java.net/aarch64-port/jdk8u60/hotspot/rev/83f5fdfd56ec

It seems Andrew Dinn fixed it in 8u already:

http://hg.openjdk.java.net/aarch64-port/jdk8u/hotspot/rev/e8cba2da936a
Comment 11 Peter Robinson 2015-11-02 17:55:42 EST
Any reason why rawhide still has java-1.8.0-openjdk-1.8.0.60 where F-21 -> F-23 has java-1.8.0-openjdk-1.8.0.65 ?

http://koji.fedoraproject.org/koji/packageinfo?packageID=15685
Comment 12 jiri vanek 2015-11-03 01:38:01 EST
Yes. Rawhide is based on different sources, which still have not been patched by security patches form 20.10.2015.
My estimation is to have ths fixed in couple of dyas.

Peter, please close the bug if the patched build passes for you non ppcs!

ty!
Comment 13 Peter Robinson 2015-11-03 06:34:47 EST
Looks to be fixed. Build is http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2868601

Note You need to log in before you can comment on or make changes to this bug.