Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionkazuhiro kawana
2021-02-09 09:13:25 UTC
### Description of problem:
We got NullpointerException from java.awt.color.ICC_Profile using openjdk11 and openjdk 1.8.0.
A same issue was reported in JDK bug database and already fixed:
Fixed bug:
https://bugs.openjdk.java.net/browse/JDK-6986863
Related bug:
https://bugs.openjdk.java.net/browse/JDK-8058973https://bugs.openjdk.java.net/browse/JDK-8254737
It looks OpenJDK 11(latest) and OpenJDK 1.8.0(latest) does not contain the above fix. Please a backport the fix.
### Version-Release number of selected component (if applicable):
- java-11-openjdk-11.0.10.0.9-4.el8_3.x86_64
- java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64
### How reproducible:
Anytime
### Steps to Reproduce:
1: Install latest openjdk 11 or openjdk 1.8.0:
I installed openjdk 11 or openjdk 1.8.0.
2: Comple sample code "MTInitCMM.java"
===
# cat MTInitCMM.java
import java.awt.color.ColorSpace;
import java.awt.color.ICC_Profile;
import java.awt.color.ICC_ProfileRGB;
import java.util.concurrent.CountDownLatch;
public final class MTInitCMM {
public static void main(String[] args) throws Exception {
ICC_ProfileRGB rgb = (ICC_ProfileRGB) ICC_Profile.getInstance(ColorSpace.CS_sRGB);
Thread[] threads = new Thread[100];
CountDownLatch go = new CountDownLatch(1);
for (int i = 0; i < threads.length; i++) {
threads[i] = new Thread(() -> {
try {
go.await();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
rgb.getMatrix();
});
}
for (Thread thread : threads) {
thread.start();
}
go.countDown();
for (Thread thread : threads) {
thread.join();
}
}
}
===
We use sample code in the following url.
https://bugs.openjdk.java.net/browse/JDK-8254737
3: Comple sample code “MTInitCMM.java” :
4: Run sample code MTInitCMM.java:
### Actual results:
You can see NullpointerException.
Java11 Latest
# /usr/lib/jvm/java-11-openjdk-11.0.10.0.9-4.el8_3.x86_64/bin/javac -cp ./ MTInitCMM.java
# /usr/lib/jvm/java-11-openjdk-11.0.10.0.9-4.el8_3.x86_64/bin/java MTInitCMM
Exception in thread "Thread-0" java.lang.NullPointerException
at java.desktop/java.awt.color.ICC_Profile.intFromBigEndian(ICC_Profile.java:1763)
at java.desktop/java.awt.color.ICC_Profile.getXYZTag(ICC_Profile.java:1563)
at java.desktop/java.awt.color.ICC_ProfileRGB.getMatrix(ICC_ProfileRGB.java:161)
at MTInitCMM.lambda$main$0(MTInitCMM.java:19)
at java.base/java.lang.Thread.run(Thread.java:834)
...snip...
Java8 Latest
# /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64/bin/javac -cp ./ MTInitCMM.java
# /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64/bin/java MTInitCMM
Exception in thread "Thread-68" java.lang.NullPointerException
at java.awt.color.ICC_Profile.intFromBigEndian(ICC_Profile.java:1767)
at java.awt.color.ICC_Profile.getXYZTag(ICC_Profile.java:1567)
at java.awt.color.ICC_ProfileRGB.getMatrix(ICC_ProfileRGB.java:161)
at MTInitCMM.lambda$main$0(MTInitCMM.java:19)
at java.lang.Thread.run(Thread.java:748)
...snip...
### Expected results:
We expect processed normally using openjdk11 or openjdk1.8.0.