Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1276959 - OpenJDK8 is ftbfs on ppc64*
Summary: OpenJDK8 is ftbfs on ppc64*
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2015-11-01 18:20 UTC by Peter Robinson
Modified: 2015-11-03 11:34 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-03 11:34:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2015-11-01 18:20:18 UTC
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 14:45:04 UTC
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 14:47:14 UTC
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 14:53:48 UTC
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 15:09:59 UTC
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 15:26:46 UTC
(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 15:46:13 UTC
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 16:58:09 UTC
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 17:03:45 UTC
This is on ppc*

It's the auto running of koji-shadow

Comment 10 Andrew John Hughes 2015-11-02 17:21:42 UTC
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 22:55:42 UTC
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 06:38:01 UTC
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 11:34:47 UTC
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.