Bug 1290936 - Zero JVM on arm fails to initialize after hardened-build
Zero JVM on arm fails to initialize after hardened-build
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk-aarch32 (Show other bugs)
26
armv7hl Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Alex Kashchenko
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-11 18:57 EST by Orion Poplawski
Modified: 2017-02-28 04:51 EST (History)
8 users (show)

See Also:
Fixed In Version: java-1.8.0-openjdk-1.8.0.65-14.b17.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-04 14:51:29 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)
Spec file patch for java-1.8.0-openjdk disabling hardening features on non-JIT arches. (3.39 KB, patch)
2015-12-16 05:08 EST, Severin Gehwolf
no flags Details | Diff

  None (edit)
Description Orion Poplawski 2015-12-11 18:57:52 EST
Description of problem:

With the update to 1.8.0.65-12.b17.fc24, vtk builds are failing on arm:

https://apps.fedoraproject.org/koschei/package/vtk

This is because:

$ JAVA_TOOL_OPTIONS=-Xmx2048m java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx2048m
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

Worked before:

$ JAVA_TOOL_OPTIONS=-Xmx2048m java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx2048m
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK Zero VM (build 25.65-b01, interpreted mode)
Comment 1 Severin Gehwolf 2015-12-14 05:48:22 EST
This seems to be a problem after the hardened build patch. java-1.8.0-openjdk fails to self-build with 1.8.0.65-11.b17.fc24 and better:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12181621
Comment 2 Severin Gehwolf 2015-12-15 08:02:15 EST
I've untagged problematic builds 1.8.0.65-{11,12}.b17.fc24 for the time being.

$ koji latest-build f24-build java-1.8.0-openjdk
Build                                     Tag                   Built by
----------------------------------------  --------------------  ----------------
java-1.8.0-openjdk-1.8.0.65-10.b17.fc24   f24                   jvanek
Comment 3 Severin Gehwolf 2015-12-16 05:07:41 EST
This seems to be an ARM/Zero only problem with the hardening build patch. I'm attaching a patch to exclude hardening for Zero builds until we know what's going on.
Comment 4 Severin Gehwolf 2015-12-16 05:08 EST
Created attachment 1106347 [details]
Spec file patch for java-1.8.0-openjdk disabling hardening features on non-JIT arches.
Comment 5 Severin Gehwolf 2015-12-16 05:12:54 EST
Scratch build with patch in comment 4. It properly bootcycles for x86_64/i686/armv7hl:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12200133

I've used this diff on top of the patch in comment 4 for this scratch build (just changing the openjdk build target to "bootcycle-images docs" and disabling the slowdebug build):

diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index 41ebd42..420e918 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -22,7 +22,7 @@
 
 # by default we build debug build during main build only on intel arches
 %ifarch %{ix86} x86_64
-%global include_debug_build 1
+%global include_debug_build 0
 %else
 %global include_debug_build 0
 %endif
@@ -1217,7 +1217,7 @@ make \
     STRIP_POLICY=no_strip \
     POST_STRIP_CMD="" \
     LOG=trace \
-    all
+    bootcycle-images docs
 
 # the build (erroneously) removes read permissions from some jars
 # this is a regression in OpenJDK 7 (our compiler):
Comment 6 Severin Gehwolf 2015-12-16 05:15:52 EST
Jiri, could you please apply the patch in comment 4 and push a koji build? If you prefer, I can do it myself. It will enable JIT arches to move forward with a hardened build without disturbing Zero arches.
Comment 7 Severin Gehwolf 2015-12-16 09:43:23 EST
Build with patch in comment 4 is on-going:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12214633
Comment 8 Severin Gehwolf 2015-12-17 05:48:36 EST
This issue should be fixed with 1.8.0.65-13.b17.fc24 (rather worked-around). Interestingly enough is that another koshei build of vtk using 1.8.0.65-12.b17.fc24 passed:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12203729
Comment 9 Fedora Update System 2015-12-22 03:39:35 EST
java-1.8.0-openjdk-1.8.0.65-14.b17.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-bde689eb98
Comment 10 Andrew John Hughes 2015-12-24 12:38:01 EST
Just further confirmation that a full bootstrap of IcedTea 3 with OpenJDK 8 fails on Fedora 23 ARM in the same way:

http://koji.fedoraproject.org/koji/taskinfo?taskID=12295374

but the same SRPM builds on F22:

http://koji.fedoraproject.org/koji/taskinfo?taskID=12297317

Unless the build also fails with other Zero architectures, the patch should only turn off the flags on ARM32, not all non-JIT archs.
Comment 11 Fedora Update System 2015-12-26 18:52:27 EST
java-1.8.0-openjdk-1.8.0.65-14.b17.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-bde689eb98
Comment 12 Fedora Update System 2016-01-04 14:51:25 EST
java-1.8.0-openjdk-1.8.0.65-14.b17.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Severin Gehwolf 2016-01-19 09:17:25 EST
I've got a setup ready now so as to be able to look at a real fix for this.

$ cat /etc/os-release 
NAME=Fedora
VERSION="24 (Server Edition)"
ID=fedora
VERSION_ID=24
PRETTY_NAME="Fedora 24 (Server Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:24"
HOME_URL="https://fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
VARIANT="Server Edition"
VARIANT_ID=server
$ uname -a
Linux localhost.localdomain 4.4.0-0.rc6.git0.1.fc24.armv7hl+lpae #1 SMP Mon Dec 21 16:40:26 UTC 2015 armv7l armv7l armv7l GNU/Linux
$ rpm -q java-1.8.0-openjdk
java-1.8.0-openjdk-1.8.0.65-12.b17.fc24.armv7hl
$ java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK Zero VM (build 25.65-b01, interpreted mode)
$ JAVA_TOOL_OPTIONS=-Xmx2048m java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx2048m
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

I'll see what I can find. Sorry that it took so long. Moving the bug back to assigned.
Comment 14 Jan Kurik 2016-02-24 09:08:00 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 15 Orion Poplawski 2016-12-28 18:45:24 EST
This seems to be back with java-1.8.0-openjdk-aarch32 1:1.8.0.112-1.161109.fc26
Comment 16 jiri vanek 2017-01-02 03:54:05 EST
Moving to Alex, he is on -aarch32 now
Comment 17 Alex Kashchenko 2017-01-02 13:31:25 EST
Looks like I've "overdone" merge with mainline jdk package inadvertently removing hardened build workaround. Restored workaround back, rawhide build in progress - https://koji.fedoraproject.org/koji/taskinfo?taskID=17150592
Comment 18 Fedora End Of Life 2017-02-28 04:51:31 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

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