Bug 1868406

Summary: java-11-openjdk property java.vendor is "N/A"
Product: Red Hat Enterprise Linux 8 Reporter: Konstantin Ryadov <kryadov>
Component: java-11-openjdkAssignee: Andrew John Hughes <ahughes>
Status: CLOSED ERRATA QA Contact: OpenJDK QA <java-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: ahughes, jandrlik, jvanek
Target Milestone: rcKeywords: ZStream
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: java-11-openjdk-11.0.8.10-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1873388 1873389 1873390 (view as bug list) Environment:
Last Closed: 2020-11-04 02:43:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1873388, 1873389, 1873390    

Description Konstantin Ryadov 2020-08-12 14:40:39 UTC
Description of problem:
On component java-11-openjdk ("openjdk version "11.0.8" 2020-07-14 LTS") java.vendor is "N/A".

Command "/usr/lib/jvm/java-11-openjdk/bin/java -XshowSettings:properties -version 2>&1 | grep java.vendor" gives output  "java.vendor = N/A" on Linux.
On Windows it is "java.vendor = Red Hat, Inc.".

Version-Release number of selected component (if applicable): 11.0.8


How reproducible:
Steps to Reproduce:
1. Install OpenJDK 11: "yum install java-11-openjdk"
2. Run "/usr/lib/jvm/java-11-openjdk/bin/java -XshowSettings:properties -version 2>&1 | grep java.vendor".


Actual results:

    java.vendor = N/A
    java.vendor.url = https://openjdk.java.net/
    java.vendor.url.bug = https://bugreport.java.com/bugreport/
    java.vendor.version = 18.9

Expected results:

    java.vendor = Red Hat, Inc.
    java.vendor.url = https://openjdk.java.net/
    java.vendor.url.bug = https://bugreport.java.com/bugreport/
    java.vendor.version = 18.9

Additional info:
See https://github.com/ojdkbuild/ojdkbuild/issues/117

Comment 1 Konstantin Ryadov 2020-08-14 10:11:42 UTC
Dear Andrew John Hughes hello,
Could you approve this bug to fix?

Comment 2 jiri vanek 2020-08-16 15:54:48 UTC
Hi!

This is unfortunate. We were aware, that  those properties are being N/A since JDK14. And thus we have prepared jdk14 packages (java-latest-openjdk from epel) and also moved, for testing purposes, Fedora packages several months ago, and had planed to bump them in rhel 8.3, so they would look like (snippet form fedora):
 /usr/lib/jvm/java-11-openjdk/bin/java -XshowSettings:properties-version 2>&1 | grep java.vendor
    java.vendor = Red Hat, Inc.
    java.vendor.url = https://www.redhat.com/
    java.vendor.url.bug = https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=32
    java.vendor.version = 18.9


I'm really sorry, that backport which introduced the change was not discovered during 11.0.8 cycle, when it was introduced:

 java-11-openjdk-headless                                        aarch64                                        1:11.0.7.10-1.el8_1        
[tester@norn3 lmdbjava]$ /usr/lib/jvm/jre-11-openjdk/bin/java -XshowSettings:properties-version 2>&1 | grep java.vendor
    java.vendor = Oracle Corporation
    java.vendor.url = http://java.oracle.com/
    java.vendor.url.bug = http://bugreport.java.com/bugreport/
    java.vendor.version = 18.9

 java-11-openjdk-headless                                        aarch64                                        1:11.0.8.10-0.el8_2                
[tester@norn3 lmdbjava]$ /usr/lib/jvm/jre-11-openjdk/bin/java -XshowSettings:properties-version 2>&1 | grep java.vendor
    java.vendor = N/A
    java.vendor.url = https://openjdk.java.net/
    java.vendor.url.bug = https://bugreport.java.com/bugreport/
    java.vendor.version = 18.9

Comment 3 jiri vanek 2020-08-16 15:55:49 UTC
Our test is already veryfing new values:
    java.vendor = Red Hat, Inc.
    java.vendor.url = https://www.redhat.com/
    java.vendor.url.bug = https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=32

But was never checking the old defaults.

Comment 4 Konstantin Ryadov 2020-08-17 09:09:11 UTC
Dear Jiri Vanek, hello, thank you for explanation!
When can we get updates for RHEL 7/8 with the fix?

Comment 5 jiri vanek 2020-08-17 12:59:42 UTC
Unless you are in real hurry, it should land at 21st October 2020

Comment 6 Konstantin Ryadov 2020-08-17 13:34:51 UTC
Dear Jiri Vanek, thank you very much - this is timely.

Comment 7 Andrew John Hughes 2020-08-17 14:05:05 UTC
Yeah, I think this may be the backport of:

https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/76bd18824601

which I meant to check when I spotted it, but never got chance (partly because it took me a long time to even get 11u to build locally)

The problem is this gets removed:

-#ifndef VENDOR
-#define VENDOR "Oracle Corporation"
-#endif

and, unlike with the VENDOR_URL & VENODR_URL_BUG changes, the defaults in make/autoconf/version-numbers are not the same.

I'll raise this upstream.

I think we could revert this regression in the next z-stream batch (early September), before going to our own branding across all JDKs at the end of October.

Jiri, what do you think? I don't really like the idea of leaving this bad value for another couple of months.

Comment 8 jiri vanek 2020-08-17 16:06:49 UTC
I would fix it upstream asap, but for rpms... Unless the requester insists, I would nto so hurry...
... However, we have https://bugzilla.redhat.com/show_bug.cgi?id=1820172 which should be cloned and for 8.2.z, and that one, we should fix before CPU. From the scope of those two bugs, why not to fix 8.2 and 8.3 ahead of time.

Not sure how with rhel 7. For rhel7 this regression is more severe.  I would NACK rhel7 for QA capacity though (we are quite bussy by removing jdk11 shenandoah forest and moving shenandoah specific tests to jdk11u project). But if we agree on fixing el8, el7 shuld not lag so much.

Comment 9 Andrew John Hughes 2020-08-17 16:59:18 UTC
Thanks for reminding me about bug 1820172. If we're going to fix that, we may as well fix this one with it. I need to test it yet, but it should be a simple one-liner (adding the old default into make/autoconf/version-numbers).

As to RHEL 7, it looks a bit tight for 0day. It would have to be on errata & in QA by Wednesday. The first batch after that is around the time of the CPU anyway. If you want to go ahead, clone this bug and I'll give the necessary ACKs.

Comment 11 Andrew John Hughes 2020-08-25 05:11:41 UTC
+ /builddir/build/BUILD/java-11-openjdk-11.0.8.10-3.el8.aarch64/openjdk/build/images/jdk/bin/javac -d . /builddir/build/SOURCES/CheckVendor.java
BUILDSTDERR: ++ sed 's|\.java||'
BUILDSTDERR: +++ basename /builddir/build/SOURCES/CheckVendor.java
BUILDSTDERR: ++ echo CheckVendor.java
+ /builddir/build/BUILD/java-11-openjdk-11.0.8.10-3.el8.aarch64/openjdk/build/images/jdk/bin/java CheckVendor 'Oracle Corporation' https://openjdk.java.net/ https://bugreport.java.com/bugreport/
BUILDSTDERR: Vendor information verified as Oracle Corporation, https://openjdk.java.net/, https://bugreport.java.com/bugreport/

Comment 20 errata-xmlrpc 2020-11-04 02:43:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (java-11-openjdk bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4657