ImageIO crashes (core dumped) while reading many image files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenJDK |
Fix Released
|
Medium
|
|||
lcms2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
openjdk-7 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Code that uses ImageIO.read() to read many image files (on my system: 270 files, totalling 522.9 MiB) crashes the JVM.
~~~ My system information:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
$ uname -a
Linux dowah 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
$ javac -version
javac 1.7.0_147
$ java -version
java version "1.7.0_147-icedtea"
~~~ To reproduce the error:
$ javac BugIIO.java
$ ulimit -c unlimited # to enable core dump
$ java BugIIO
~~~ Terminal output that signifies the error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fb5ba
#
# JRE version: 7.0_147-b147
# Java VM: OpenJDK 64-Bit Server VM (21.0-b17 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea7 2.0
# Distribution: Ubuntu 11.10, package 7~b147-
# Problematic frame:
# C [liblcms2.
#
# Core dump written. Default location: /home/joshua/core or core.4978
#
# An error report file with more information is saved as:
# /home/joshua/
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https:/
#
Dibatalkan (core didump)
~~~ PS
When I tried to compile BugIIO.java on openjdk-6 and run it on openjdk-6, the program finishes normally (no crash).
To clarify:
1. This bug affect OpenJDK 7 (7~b147-
2. This bug does *not* affect OpenJDK 6 (6b23~pre11-
Joshua Rocky Tuahta Purba (jrocky) wrote : | #1 |
Joshua Rocky Tuahta Purba (jrocky) wrote : | #2 |
Joshua Rocky Tuahta Purba (jrocky) wrote : | #3 |
- core.xz - core dump (xz compressed) Edit (8.6 MiB, application/octet-stream)
Here is the "core dump" (xz compressed, uncompress before use) from this step (as described above):
$ java BugIIO
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Joshua Rocky Tuahta Purba (jrocky) wrote : | #4 |
- NonBugIIO.java - this class will run, and *not* cause crash. Edit (972 bytes, text/x-java)
I have just found out that, using BufferedInputStream - instead of java.io.File - as parameter for ImageIO.read() will not cause core dump. This probably means that there is something wrong with the code in ImageIO.read() that cause crash while reading from java.io.File.
P.S. the difference between NonBugIIO.java and BugIIO.java, is that the BugIIO.java uses File as parameter for ImageIO.read(), while NonBugIIO.java uses BufferedInputStream as parameter for ImageIO.read().
Vova Zoubritsky (vogre-z) wrote : | #5 |
- Image with sRGB profile which may cause a crash Edit (456.4 KiB, image/jpeg)
I was lucky(?) enough to find a single image which causes the crash for me (running on a 1Gb folder of other images did nothing), however, it must be said that the crash doesn't always happen ib the same way:
1) Running the minimal Java code (BugIIO.
2) Running the minimal code with sbt (which loads the class dynamically) loads the image fine and does not have an exception.
3) Using the same image in different points of my program (I can attach it as well) causes either the "Can't load standard profile" exception or a crash at sun.java2d.
Using other images (without sRGB profile - checked with exiftool) or openjdk6 does not cause crashes or exceptions.
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in openjdk-7 (Ubuntu): | |
status: | New → Confirmed |
Hendy Irawan (ceefour) wrote : | #7 |
Still happens on Ubuntu 12.04, tested i386
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.
OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
Carlo (john23) wrote : | #8 |
Happens on ubuntu 12.04 x64 too.
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
David White (cppege-david-9ei9ny) wrote : | #9 |
- Crash log file Edit (88.1 KiB, text/plain)
I've found this issue happens intermitently on my setup:
Ubuntu 13.04 64-bit
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
I get an intermitent crash when decoding JPEGs, decoding in several threads.
Thread pool is created thus:
ExecutorService threadpool = Executors.
Image decode tasks added this:
ImageScaler scaler = new ImageScaler(size);
threadpool.
ImageScaler class is:
private class ImageScaler extends SwingWorker<
private int size;
public ImageScaler(int size) {
this.size = size;
}
@Override
public ImageIcon doInBackground() {
LOGGER.
"Loading image: "+url);
ImageReader ir;
//create a new instance of imageReader
synchronized
Iterator<
ir = it.next();
if (ir == null) {
LOGGER.
"No image reader found for JPEGs");
System.
}
ImageReaderSpi spi = ir.getOriginati
try {
ir = spi.createReade
} catch (Exception e) {
LOGGER.
"Could not create new JPEG reader instance", e);
return null;
}
}
//Load the image from the URL (could be local or HTTP)
BufferedImage image;
try {
[...]
File cacheDir = new File (strCacheDir);
cacheDir.
URL u = new URL(url);
FileCacheIm
u.
ir.
image = ir.read(0);
fcis.close();
} catch (Exception e) {
LOGGER.
"Could not read image "+url, e);
return null;
} catch (OutOfMemoryError e) {
LOGGER.
"Out of memory reading image: "+url, e);
return null;
} finally {
ir.dispose();
}
return new ImageIcon(
}
@Override
protected void done() {
if (isCancelled())
return;
ImageIcon icon = null;
try {
icon = get();
} catch (Exception ignore) {}
if (icon == null) {
LOGGER.
"Scaled image is null: "+url);
return;
}
rendered = icon;
renderedSize = size;
mPcs.
}
}
The crash actually occurs in ICC_Profile code. I get intermitent colour issues with decoded JPEGs where the image is totally mid-green except for areas that are dark which tend to black. Is there an issue in the colour code for multi-threaded decode? I've done my best to create an image reader in a thread-safe way.
I've attached the crash log file.
Joshua Rocky Tuahta Purba (jrocky) wrote : | #10 |
I noticed that our crash log file points to the same "problematic frame", that is liblcms2.so.2.
From my log:
# Problematic frame:
# C [liblcms2.
From your log:
# Problematic frame:
# C [liblcms2.
Likewise, the java frame in our logs also have identical parts:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.java2d.
j java.awt.
j java.awt.
j java.awt.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
David White (cppege-david-9ei9ny) wrote : | #11 |
I've just got the same crash in a slightly different bit of code (same project, but server side, not client side). The java frames from the crash log is as for the client code crash and the same as Joshua.
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.java2d.
j java.awt.
j java.awt.
j java.awt.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j uk.co.netriver.
j uk.co.netriver.
j uk.co.netriver.
j java.lang.
v ~StubRoutines:
David White (cppege-david-9ei9ny) wrote : | #12 |
My server code is now throwing null pointer exceptions due to an issue in the same area (ICC colour profiles). I've been running test successfully with the same photos all morning and now they won't load at all. There has been no code change to the server. I'm guessing there's an underlying library problem.
Exception in thread "TaskProcessor" java.lang.
at java.awt.
at java.awt.
at sun.java2d.
at sun.java2d.
at java.awt.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at javax.imageio.
David White (cppege-david-9ei9ny) wrote : | #13 |
Another similar but slightly different error. Image decoded decided to stop working (no changes to code) with this exception being thrown. Was working a second ago.
WARNING: Could not read image file:/home/
java.awt.
at sun.java2d.
at sun.java2d.
at sun.java2d.
at java.awt.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at javax.imageio.
at uk.co.netriver.
at uk.co.netriver.
at javax.swing.
at java.util.
at java.util.
at javax.swing.
at java.util.
at java.util.
at java.util.
at java.util.
at java.util.
at java.lang.
Katerina (katerina-andreadou) wrote : | #14 |
I am getting the same error when reading many images from different URLs
BufferedImage image = ImageIO.
Is there any available fix for this issue?
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.java2d.
j java.awt.
j java.awt.
j java.awt.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j javax.imageio.
j javax.imageio.
Joshua Rocky Tuahta Purba (jrocky) wrote : | #15 |
I don't think there is any fix yet.
In Iced Tea Bugzilla #1896, Florian Bantner (f-bantner) wrote : | #17 |
Created attachment 1142
crash dump
It seems liblcms2-2 (at least under Ubuntu14.04 / 64bit) is not threadsafe at all.
If use multithreaded IMAGEIO.read( File ) shows all kind of strange bugs including a complete vm crash. The crashdump is attached.
This can be reproduces by starting (about?) 64 Threads and using IMAGEIO.read( File ) in an endless loop for random *but different* files. This programm must be run a few times since the crashes happen to appear shortly after starting it or not at all.
Crashes happens in
C [liblcms2.
C [liblcms2.
Code to reproduce:
public static void main( String[] args ) throws Exception {
for( int i=0; i<64; i++ ){
Thread t = new Thread( new ImageReader() );
t.start();
}
}
private static class ImageReader implements Runnable {
@Override
public void run() {
int i=0;
while( true ){
System.
try {
File f = findJpg();
ImageIO.read( f );
} catch( IOException e ) {
throw new RuntimeException( e );
}
i++;
}
}
}
private static File findJpg( File base ){
// Return a randomly chosen JPG from a larger pool
}
In Iced Tea Bugzilla #1896, Sgehwolf (sgehwolf) wrote : | #18 |
*** Bug 1897 has been marked as a duplicate of this bug. ***
In Iced Tea Bugzilla #1896, Florian Bantner (f-bantner) wrote : | #19 |
Seems this is a problem of liblcms2-2.5. As Marti told me 2.6 is tested for multithreading.
In Iced Tea Bugzilla #1896, Andrew John Hughes (ahughes) wrote : | #20 |
CLosing this then, if it's an issue with the native library.
In Iced Tea Bugzilla #1896, Claudio-a-delgado (claudio-a-delgado) wrote : | #21 |
Using: Linux 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc008
#
# JRE version: 7.0_25-b30
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [liblcms2.
Josef Pacula (josef-pacula) wrote : | #16 |
We are getting the same problem, happening on https:/
$ java -version
java version "1.6.0_32"
OpenJDK Runtime Environment (IcedTea6 1.13.4) (6b32-1.
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
The stack trace follows:
java.awt.
at sun.java2d.
at sun.java2d.
at sun.java2d.
at java.awt.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at javax.imageio.
at javax.imageio.
no longer affects: | openjdk-6 (Ubuntu) |
Changed in openjdk: | |
importance: | Unknown → Medium |
status: | Unknown → Invalid |
In Iced Tea Bugzilla #1896, Andrew John Hughes (ahughes) wrote : | #22 |
*** Bug 2115 has been marked as a duplicate of this bug. ***
Jamie Maher (jmaher-guser) wrote : | #23 |
There's a new version 2.7 of the native library LittleCMS released on 2015-03-18, which is supposed to improve multithreading.
On the homepage the news posted for version 2.7 is:
"Little CM2 2.7 released! which improves multi threading, adds contexts and a new locking plug-in type, among bugfixes and other minor features. If you run lcms in multiple threads, upgrading to this version is highly recommended."
I sent an email to the Author (Marti) and was mentiong a similar issue:
"I use the libcms2-2 version 2.6-3ubuntu1 library via Java IcedTea on Ubuntu, and was just researching if there was a new version to fix ICC embedded jpgs being resized with a purple tinge. (it seems to sometimes be a problem upon startup on a 6-core multiprocessor server) "
Marti replied: "BTW, 2.7 fixes the issue on multiple threads."
In Iced Tea Bugzilla #1896, Andrew John Hughes (ahughes) wrote : | #24 |
Re-opening this because this version of LCMS (2.5) is used in-tree when --disable-
changeset: 10176:aa400be54fec
user: prr
date: Thu Sep 04 13:00:55 2014 -0700
summary: 8056122: Upgrade JDK to use LittleCMS 2.6
Changed in openjdk: | |
status: | Invalid → In Progress |
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #25 |
details: http://
author: prr
date: Thu Sep 04 13:00:55 2014 -0700
8056122, PR1896: Upgrade JDK to use LittleCMS 2.6
Reviewed-by: bae, jgodinez
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #26 |
details: http://
author: simonis
date: Wed Sep 10 11:01:59 2014 +0200
8057934, PR1896: Upgrade to LittleCMS 2.6 breaks AIX build
Reviewed-by: prr, serb
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #27 |
details: http://
author: prr
date: Mon May 11 09:14:03 2015 -0700
8078331, PR1896: Upgrade JDK to use LittleCMS 2.7
Reviewed-by: serb, bae
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #28 |
details: http://
author: prr
date: Thu Jun 11 12:23:47 2015 -0700
8081756, PR1896: Mastering Matrix Manipulations
Reviewed-by: serb, bae, mschoene
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #29 |
details: http://
author: Andrew John Hughes <email address hidden>
date: Sun Oct 04 01:34:28 2015 +0100
Bump to icedtea-2.7.0pre02.
2015-10-03 Andrew John Hughes <email address hidden>
* Makefile.am:
(CORBA_
(JAXP_CHANGESET): Likewise.
(JAXWS_
(JDK_CHANGESET): Likewise.
(LANGTOOLS_
(OPENJDK_
(CORBA_
(JAXP_SHA256SUM): Likewise.
(JAXWS_
(JDK_SHA256SUM): Likewise.
(LANGTOOLS_
(OPENJDK_
* NEWS: Updated.
* configure.ac: Bump to 2.7.0pre02.
* hotspot.map.in: Update to icedtea-2.7.0pre02.
Upstream changes:
- Bump to icedtea-2.7.0pre02
- PR2512: Reset success following calls in LayoutManager.cpp
- S7105461, PR2571: Large JTables are not rendered correctly with Xrender pipeline
- S7150134, PR2571: JCK api/java_
- S8011709, PR2509: [parfait] False positive: memory leak in jdk/src/
- S8023052, PR2509: JVM crash in native layout
- S8042855, PR2509: [parfait] Potential null pointer dereference in IndicLayoutEngi
- S8056122, PR1896: Upgrade JDK to use LittleCMS 2.6
- S8057934, PR1896: Upgrade to LittleCMS 2.6 breaks AIX build
- S8078331, PR1896: Upgrade JDK to use LittleCMS 2.7
- S8081756, PR1896: Mastering Matrix Manipulations
- S8087120, RH1206656, PR2553: [GCC5] java.lang.
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #30 |
details: http://
author: prr
date: Thu Sep 04 13:00:55 2014 -0700
8056122, PR1896: Upgrade JDK to use LittleCMS 2.6
Reviewed-by: bae, jgodinez
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #31 |
details: http://
author: simonis
date: Wed Sep 10 11:01:59 2014 +0200
8057934, PR1896: Upgrade to LittleCMS 2.6 breaks AIX build
Reviewed-by: prr, serb
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #32 |
details: http://
author: prr
date: Mon May 11 09:14:03 2015 -0700
8078331, PR1896: Upgrade JDK to use LittleCMS 2.7
Reviewed-by: serb, bae
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #33 |
details: http://
author: prr
date: Thu Jun 11 12:23:47 2015 -0700
8081756, PR1896: Mastering Matrix Manipulations
Reviewed-by: serb, bae, mschoene
In Iced Tea Bugzilla #1896, Mercurial (mercurial) wrote : | #34 |
details: http://
author: Andrew John Hughes <email address hidden>
date: Tue Oct 20 04:30:23 2015 +0100
Bump to icedtea-2.6.2pre02.
Upstream changes:
- Bump to icedtea-2.6.2pre01
- Bump to icedtea-2.6.2pre02
- PR2512: Reset success following calls in LayoutManager.cpp
- PR2568: openjdk causes a full desktop crash on RHEL 6 i586
- S6880559, PR2674: Enable PKCS11 64-bit windows builds
- S6904403, PR2674: assert(f == k->has_
- S7011441, PR2674: jndi/ldap/
- S7059542, PR2674: JNDI name operations should be locale independent
- S7105461, PR2571: Large JTables are not rendered correctly with Xrender pipeline
- S7105883, PR2560: JDWP: agent crash if there exists a ThreadGroup with null name
- S7107611, PR2674: sun.security.
- S7127066, PR2674: Class verifier accepts an invalid class file
- S7150092, PR2674: NTLM authentication fail if user specified a different realm
- S7150134, PR2571: JCK api/java_
- S7152582, PR2674: PKCS11 tests should use the NSS libraries available in the OS
- S7156085, PR2674: ArrayIndexOutOf
- S7177045, PR2674: Rework the TestProviderLea
- S7190945, PR2674: pkcs11 problem loading NSS libs on Ubuntu
- S8005226, PR2674: java/rmi/
- S8009438, PR2674: sun/security/
- S8011709, PR2509: [parfait] False positive: memory leak in jdk/src/
- S8012971, PR2674: PKCS11Test hiding exception failures
- S8016105, PR2560: Add complementary RETURN_NULL allocation macros in allocation.hpp
- S8020424, PR2674: The NSS version should be detected before running crypto tests
- S8020443, PR2674: Frame is not created on the specified GraphicsDevice with two monitors
- S8021897, PR2560: EXCEPTION_
- S8022683, PR2560: JNI GetStringUTFChars should return NULL on allocation failure not abort the VM
- S8023052, PR2509: JVM crash in native layout
- S8025922, PR2560: JNI access to Strings need to check if the value field is non-null
- S8027058: sun/management/
- S8027624, PR2674: com/sun/
- S8033069, PR2674: mouse wheel scroll closes combobox popup
- S8035150, PR2674: ShouldNotReachH
- S8039212, PR2674: SecretKeyBasic.sh needs to avoid NSS libnss3 and libsoftokn3 version mismatches
- S8042855, PR2509: [parfait] Potential null pointer dereference in IndicLayoutEngi
- S8044364, PR2674: runtime/
- ...
Changed in openjdk: | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #35 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in lcms2 (Ubuntu): | |
status: | New → Confirmed |
Mauro (mauromol) wrote : | #36 |
This bug is marked as fixed in OpenJDK (version 2.6.2 of IcedTea should depend on LittleCMS 2.6), however in Trusty we have openjdk-
Today I faced this problem (the JVM crashed).
Tiago Stürmer Daitx (tdaitx) wrote : | #37 |
Mauro,
Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:
* Is this reproducible?
* If so, what specific steps should we take to recreate this bug?
* Does it affect OpenJDK 6 as well?
Please post or attach the error output so we can verify it is actually the same bug.
This will help us to find and resolve the problem.
Changed in lcms2 (Ubuntu): | |
status: | Confirmed → Incomplete |
Changed in openjdk-7 (Ubuntu): | |
status: | Confirmed → Incomplete |
Mauro (mauromol) wrote : | #38 |
- Dump created by the JVM Edit (161.4 KiB, text/plain)
Hi Tiago!
I don't know if it's reproducible, today our web application suddenly was offline because the OpenJDK JVM process running Tomcat had died with a crash. I'm attaching the dump.
It's the first time this happens. If it's a concurrency issue, it's really hard to say whether it will happen again and when.
I don't know if it affects OpenJDK 6 as well, because this web application needs Java 7 to run, so I can't run it with OpenJDK 6.
I determined it was the same bug because the topmost frames of the dump seems exactly those reported here.
Mauro (mauromol) wrote : | #39 |
Just an additional note: this happened with openjdk-
Tiago Stürmer Daitx (tdaitx) wrote : | #40 |
Mauro,
Thanks for the additional information. Your and IcedTea's reports seem to indicate that LCMS 2.5 is the culprit for not being thread safe.
I will try to reproduce it later on so I can test if a newer version does indeed fix this issue.
Tiago Stürmer Daitx (tdaitx) wrote : | #41 |
I was unable to reproduce it yesterday, but it was due to the jpeg files I was using. I repeated it today with different jpeg files and reproduced it.
Got a crash on OpenJDK 7u101 with both LCMS 2.5 (Trusty) and 2.6 (Wily), also reproduced when using the LCMS lib that comes with OpenJDK (by default Ubuntu uses the lib from lcms2-2 package). OpenJDK 8 on Wily uses the same LCMS and does not crash.
I will report this upstream.
In Iced Tea Bugzilla #1896, Tiago Stürmer Daitx (tdaitx) wrote : | #43 |
I was able to reproduce this issue on Ubuntu's IcedTea 2.6.6 running:
- the integrated lcms library (disable-
- lcms 2.5 and 2.6 system library (enable-
For some reason that I haven't been able to track down yet it does depend on the JPEG file under test - a initial sample I grabbed from the internet ran just fine, only when I tested it against bunch grabbed from `locate .jpg` was I able to reproduce it.
I haven't tested it against 3.x, but OpenJDK 8u91 runs just fine when using the same lcms 2.6 so I would expect similar results.
Let me know if hs_err and/or core files would be of any help, as well as running it against an upstream IcedTea build (Ubuntu does not patch anything related to lcms).
Started a few testes after an Ubuntu user reported running into this issue (https:/
In Iced Tea Bugzilla #1896, Andrew John Hughes (ahughes) wrote : | #44 |
Well, we at least need a reproducer to begin with. Can you supply the code and JPEG file you're able to reproduce this with?
In Iced Tea Bugzilla #1896, Tiago Stürmer Daitx (tdaitx) wrote : | #45 |
Created attachment 1529
testcase to reproduce it
Provide jpeg files (at least 128 of them) in a ./jpg directory
Run using something like:
$ while ! timeout --preserve-status 10 java Lp9133434Imageio; do echo " done."; done
as the bug doesn't happen on every run (seem to depend on the jpeg files under test, I can get it once about every 5 runs).
In Iced Tea Bugzilla #1896, Tiago Stürmer Daitx (tdaitx) wrote : | #46 |
Got together a bunch of images from the various hs_err I had at hand.
I was unable to keep the file under 1 MB for upload, thus I uploaded it here: https:/
Mauro (mauromol) wrote : | #42 |
Thank you Tjago, I will monitor upstream too!
Changed in openjdk: | |
status: | Fix Released → Confirmed |
In Iced Tea Bugzilla #1896, Peterwcostello (peterwcostello) wrote : | #47 |
This is a multi-threading problem with LCMS version 2.5. It was claimed to have been fixed with LCMS v2.6, but many OS are still running the older packages. I have code that parses PDF files. It is running in a production environment on random PDF files and with lots of threads. I was able to stop the error (~2 years ago) by adding "syncronized" keyword around the following block of java code:
ICC_Profile profile = ICC_Profile.
ICC_ColorSpace colorSpace = new ICC_ColorSpace(
int numComponents = 3; // From PDF dictionary, typically '3' (RGB).
float[] components = new float[numCompon
// Test that ICC_Profile can be parsed
// Generates an exception on malformed byte[]
// Crashes JVM sporadically if not forced inline by 'syncronized'
new java.awt.
If it helps, here's my java method (won't compile as it is missing methods):
public static synchronized PDFColorSpace getICCColorSpac
PDFColorSpace cs=null;
PDFToken nToken = dict.getDiction
int numComponents = (nToken==null) ? 1 : nToken.
try {
ICC_Profile profile = ICC_Profile.
// This does not prevent JVM Crash with BELL.SW
// if (profile.
ICC_ColorSpace colorSpace = new ICC_ColorSpace(
cs = new NativeColorSpac
// Test if ICC_Profile is OK. Will throw Exception (or even crash the JVM)
// eg: Cik#99001898, http://
// eg: JVM Crash, Cik#99002137, BELL.SW
float[] components = new float[numCompon
new java.awt.
} catch (Exception e) {
cs=null;
}
return cs;
}
In Iced Tea Bugzilla #3020, Andrew John Hughes (ahughes) wrote : | #54 |
I was able to reproduce the issue in bug 1896 on Ubuntu's IcedTea 2.6.6 running:
- the integrated lcms library (disable-
- lcms 2.5 and 2.6 system library (enable-
For some reason that I haven't been able to track down yet it does depend on the JPEG file under test - a initial sample I grabbed from the internet ran just fine, only when I tested it against bunch grabbed from `locate .jpg` was I able to reproduce it.
I haven't tested it against 3.x, but OpenJDK 8u91 runs just fine when using the same lcms 2.6 so I would expect similar results.
Let me know if hs_err and/or core files would be of any help, as well as running it against an upstream IcedTea build (Ubuntu does not patch anything related to lcms).
Started a few testes after an Ubuntu user reported running into this issue (https:/
In Iced Tea Bugzilla #1896, Andrew John Hughes (ahughes) wrote : | #48 |
The in-tree version of LCMS 2 has been updated to 2.7. There's nothing we can do about distros using an old system version. They need to either update it or use the in-tree version.
As this bug was used to ship the update to 2.7 in IcedTea 2.6.2, I'm re-closing it and handling Tiago's issue under a new bug, bug 3020.
In Iced Tea Bugzilla #3020, Andrew John Hughes (ahughes) wrote : | #55 |
Crash from Tiago's reproducer looks like this:
Stack: [0x00007f69b2ae
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libjavalcms.
j sun.java2d.
j sun.java2d.
88
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
or
Stack: [0x00007f22a0c2
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libjavalcms.
C [libjavalcms.
C [libjavalcms.
j sun.java2d.
j java.awt.
j java.awt.
j java.awt.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
https:/
Changed in openjdk: | |
status: | Confirmed → Fix Released |
Jamie Maher (jmaher-guser) wrote : | #49 |
Just yesterday using openjdk-
It usually happens after a restart of Tomcat and on first access of a webapp that resizes multiple jpgs (some containing ICC profiles).
This happened with an apt pinned version of liblcms2-2:
version 2.6-3ubuntu2 from Ubuntu Wily.
# JRE version: OpenJDK Runtime Environment (7.0_101) (build 1.7.0_101-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.95-b01 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.6
# Distribution: Ubuntu 14.04 LTS, package 7u101-2.
R11=0x00007f7f2
R12=0x00007f7f6
R13=0x00007f7f6
R14=0x000000000
R15=0x00007f7f2
Stack: [0x00007f7f277f
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.java2d.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j javax.imageio.
j javax.imageio.
In Iced Tea Bugzilla #3020, Jamie-maher+bugz (jamie-maher+bugz) wrote : | #56 |
With libcms2-2 version 2.7-1ubuntu1 pinned from Ubuntu yakkety (running on Trusty 14.04 LTS):
Can produce crash reading jpgs in multiple threads fairly consistently.
(once out of 14 runs of simplified java test class on directory of 31 jpgs).
Running on java package openjdk-
JRE version: OpenJDK Runtime Environment (7.0_101) (build 1.7.0_101-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.95-b01 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.6
# Distribution: Ubuntu 14.04 LTS, package 7u101-2.
# Problematic frame:
# C [liblcms2.
Stack: [0x00007f7227bf
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [liblcms2.
j sun.java2d.
j sun.java2d.
j sun.java2d.
j java.awt.
j com.sun.
v ~StubRoutines:
V [libjvm.
V [libjvm.
V [libjvm.
V [libjvm.
C [libjavajpeg.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j com.sun.
j javax.imageio.
j javax.imageio.
j BugIIO$
j java.lang.
In Iced Tea Bugzilla #3020, Jamie-maher+bugz (jamie-maher+bugz) wrote : | #57 |
Also experienced jvm crash with same versions above but no SIGSERV detected:
Exception in thread "Thread-8" java.lang.
at java.awt.
at java.awt.
at sun.java2d.
at java.awt.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at com.sun.
at javax.imageio.
at javax.imageio.
at BugIIO$
at java.lang.
java: cmsio0.c:1301: cmsSaveProfileT
Aborted (core dumped)
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #58 |
details: http://
author: bae
date: Mon Dec 24 14:22:23 2012 +0400
8005402, PR3020: Need to provide benchmarks for color management
Reviewed-by: jgodinez, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #59 |
details: http://
author: bae
date: Tue Oct 23 13:10:52 2012 +0400
7051394, PR3020: NullPointerExce
Reviewed-by: jgodinez, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #60 |
details: http://
author: bae
date: Mon Jul 18 16:36:48 2016 +0100
7124245, PR3020: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244,244,0
Reviewed-by: prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #61 |
details: http://
author: bae
date: Mon Jul 18 17:45:32 2016 +0100
8005530, PR3020: [lcms] Improve performance of ColorConverOp for default destinations
Reviewed-by: prr, jgodinez
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #62 |
details: http://
author: anashaty
date: Tue Jul 08 17:47:47 2014 +0400
8047066, PR3020: Test test/sun/awt/image/bug8038000.java fails with ClassCastException
Reviewed-by: bae, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #63 |
details: http://
author: bae
date: Mon Jul 18 18:07:23 2016 +0100
8005930, PR3020: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination.
Reviewed-by: prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #64 |
details: http://
author: bae
date: Thu Jun 06 13:57:25 2013 +0400
8013430, PR3020: REGRESSION: closed/
Reviewed-by: prr, vadim
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #65 |
details: http://
author: bae
date: Mon Jul 18 19:01:07 2016 +0100
7043064, PR3020: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
Reviewed-by: prr, vadim
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #66 |
details: http://
author: bae
date: Tue Sep 10 21:54:14 2013 +0400
8024511, PR3020: Crash during color profile destruction
Reviewed-by: vadim, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #67 |
details: http://
author: jchen
date: Tue Oct 15 14:16:27 2013 -0700
8025429, PR3020: [parfait] warnings from b107 for sun.java2d.cmm: JNI exception pending
Reviewed-by: prr, bae
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #68 |
details: http://
author: bae
date: Wed Oct 16 17:13:15 2013 +0400
8026702, PR3020: Fix for 8025429 breaks jdk build on windows
Reviewed-by: serb
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #69 |
details: http://
author: bae
date: Tue Oct 22 13:28:44 2013 +0400
8026780, PR3020: Crash on PPC and PPC v2 for Java_awt test suit
Reviewed-by: prr, jchen
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #70 |
details: http://
author: Andrew John Hughes <email address hidden>
date: Wed Jul 20 14:00:17 2016 +0100
Bump to icedtea-2.7.0pre06.
Upstream changes:
- PR2799: Files are missing from resources.jar
- PR2900: Don't use WithSeed versions of NSS functions as they don't fully process the seed
- S2178143, PR2958: JVM crashes if the number of bound CPUs changed during runtime
- S4900206, PR3101: Include worst-case rounding tests for Math library functions
- S6260348, PR3067: GTK+ L&F JTextComponent not respecting desktop caret blink rate
- S6934604, PR3075: enable parts of EliminateAutoBox by default
- S7043064, PR3020: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
- S7051394, PR3020: NullPointerExce
- S7086015, PR3013: fix test/tools/
- S7119487, PR3013: JavacParserTest
- S7124245, PR3020: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244,244,0
- S7159445, PR3013: (javac) emits inaccurate diagnostics for enhanced for-loops
- S7175845, PR1437, RH1207129: 'jar uf' changes file permissions unexpectedly
- S8005402, PR3020: Need to provide benchmarks for color management
- S8005530, PR3020: [lcms] Improve performance of ColorConverOp for default destinations
- S8005930, PR3020: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination.
- S8013430, PR3020: REGRESSION: closed/
- S8014286, PR3075: failed java/lang/
- S8014959, PR3075: assert(
- S8019247, PR3075: SIGSEGV in compiled method c8e.e.t_
- S8024511, PR3020: Crash during color profile destruction
- S8025429, PR3020: [parfait] warnings from b107 for sun.java2d.cmm: JNI exception pending
- S8026702, PR3020: Fix for 8025429 breaks jdk build on windows
- S8026780, PR3020: Crash on PPC and PPC v2 for Java_awt test suit
- S8047066, PR3020: Test test/sun/awt/image/bug8038000.java fails with ClassCastException
- S8069181, PR3012, RH1015612: java.lang.
- S8148328: aarch64: redundant lsr instructions in stub code.
- S8148783: aarch64: SEGV running SpecJBB2013
- S8148948: aarch64: generate_copy_longs calls align() incorrectly
- S8150045: arraycopy causes segfaults in SATB during garbage collection
- S8151841, PR3098: Build needs additional flags to compile with GCC 6
- S8154537: AArch64: some integer rotate instructions are never emitted
- S8154739: AArch64: TemplateTable:
- S8157906: aarch64: some more integer rotate instructions are never emitted
- S8158260, PR2992, RH1341258: PPC64: unaligned Unsafe.getInt can l...
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #71 |
details: http://
author: bae
date: Mon Dec 24 14:22:23 2012 +0400
8005402, PR3020: Need to provide benchmarks for color management
Reviewed-by: jgodinez, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #72 |
details: http://
author: bae
date: Tue Oct 23 13:10:52 2012 +0400
7051394, PR3020: NullPointerExce
Reviewed-by: jgodinez, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #73 |
details: http://
author: bae
date: Mon Jul 18 16:36:48 2016 +0100
7124245, PR3020: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244,244,0
Reviewed-by: prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #74 |
details: http://
author: bae
date: Mon Jul 18 17:45:32 2016 +0100
8005530, PR3020: [lcms] Improve performance of ColorConverOp for default destinations
Reviewed-by: prr, jgodinez
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #75 |
details: http://
author: anashaty
date: Tue Jul 08 17:47:47 2014 +0400
8047066, PR3020: Test test/sun/awt/image/bug8038000.java fails with ClassCastException
Reviewed-by: bae, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #76 |
details: http://
author: bae
date: Mon Jul 18 18:07:23 2016 +0100
8005930, PR3020: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination.
Reviewed-by: prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #77 |
details: http://
author: bae
date: Thu Jun 06 13:57:25 2013 +0400
8013430, PR3020: REGRESSION: closed/
Reviewed-by: prr, vadim
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #78 |
details: http://
author: bae
date: Mon Jul 18 19:01:07 2016 +0100
7043064, PR3020: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
Reviewed-by: prr, vadim
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #79 |
details: http://
author: bae
date: Tue Sep 10 21:54:14 2013 +0400
8024511, PR3020: Crash during color profile destruction
Reviewed-by: vadim, prr
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #80 |
details: http://
author: jchen
date: Tue Oct 15 14:16:27 2013 -0700
8025429, PR3020: [parfait] warnings from b107 for sun.java2d.cmm: JNI exception pending
Reviewed-by: prr, bae
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #81 |
details: http://
author: bae
date: Wed Oct 16 17:13:15 2013 +0400
8026702, PR3020: Fix for 8025429 breaks jdk build on windows
Reviewed-by: serb
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #82 |
details: http://
author: bae
date: Tue Oct 22 13:28:44 2013 +0400
8026780, PR3020: Crash on PPC and PPC v2 for Java_awt test suit
Reviewed-by: prr, jchen
In Iced Tea Bugzilla #3020, Mercurial (mercurial) wrote : | #83 |
details: http://
author: Andrew John Hughes <email address hidden>
date: Fri Jul 29 03:33:41 2016 +0100
Bump to icedtea-2.6.7.
Upstream changes:
- Bump to icedtea-2.6.7
- Bump to icedtea-2.6.7pre01
- PR2799: Files are missing from resources.jar
- PR2900: Don't use WithSeed versions of NSS functions as they don't fully process the seed
- PR3102: Extend 8022594 to AixPollPort
- S2178143, PR2958: JVM crashes if the number of bound CPUs changed during runtime
- S4900206, PR3101: Include worst-case rounding tests for Math library functions
- S6260348, PR3067: GTK+ L&F JTextComponent not respecting desktop caret blink rate
- S6934604, PR3075: enable parts of EliminateAutoBox by default
- S6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package
- S7043064, PR3020: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
- S7051394, PR3020: NullPointerExce
- S7060849: Eliminate pack200 build warnings
- S7064075: Security libraries don't build with javac -Xlint:
- S7069870: Parts of the JDK erroneously rely on generic array initializers with diamond
- S7081817: test/sun/
- S7086015, PR3013: fix test/tools/
- S7102686: Restructure timestamp code so that jars and modules can more easily share the same code
- S7105780: Add SSLSocket client/SSLEngine server to templates directory
- S7119487, PR3013: JavacParserTest
- S7124245, PR3020: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244,244,0
- S7142339: PKCS7.java is needlessly creating SHA1PRNG SecureRandom instances when timestamping is not done
- S7152582: PKCS11 tests should use the NSS libraries available in the OS
- S7159445, PR3013: (javac) emits inaccurate diagnostics for enhanced for-loops
- S7175845, PR1437, RH1207129: 'jar uf' changes file permissions unexpectedly
- S7192202: Make sure keytool prints both unknown and unparseable extensions
- S7194449: String resources for Key Tool and Policy Tool should be in their respective packages
- S7196855: autotest.sh fails on ubuntu because libsoftokn.so not found
- S7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so
- S8002306: (se) Selector.open fails if invoked with thread interrupt status set [win]
- S8005402, PR3020: Need to provide benchmarks for color management
- S8005530, PR3020: [lcms] Improve performance of ColorConverOp for default destinations
- S8005930, PR3020: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination.
- S8009636: JARSigner including TimeStamp PolicyID (TSAPolicyID) as defined in RFC3161
- S8013430, PR3020: REGRESSION: closed/
In Iced Tea Bugzilla #3020, Andrew John Hughes (ahughes) wrote : | #84 |
Resolved in icedtea-2.6.7 and icedtea-2.7.0pre06.
Launchpad Janitor (janitor) wrote : | #50 |
This bug was fixed in the package openjdk-7 - 7u111-2.
---------------
openjdk-7 (7u111-
* Backport to Ubuntu 12.04.
openjdk-7 (7u111-
* debian/
after the introduction of two new Unsafe methods in the OpenJDK
hotspot. Closes: #833933. (LP: #1611598)
openjdk-7 (7u111-
* Backport to Ubuntu 12.04.
openjdk-7 (7u111-
[ Matthias Klose ]
* Fix handling of /usr/lib/
(Andreas Beckmann). Closes: #821858.
* Add missing includes for aarch64 hotspot backport (building without pch).
* Use in-tree lcms for backports.
[ Tiago Stürmer Daitx ]
* IcedTea release 2.6.7 (based on 7u111):
* Security fixes
- S8079718, CVE-2016-3458: IIOP Input Stream Hooking
- S8145446, CVE-2016-3485: Perfect pipe placement (Windows only)
- S8147771: Construction of static protection domains under Javax
custom policy
- S8148872, CVE-2016-3500: Complete name checking
- S8149962, CVE-2016-3508: Better delineation of XML processing
- S8150752: Share Class Data
- S8151925: Font reference improvements
- S8152479, CVE-2016-3550: Coded byte streams
- S8155981, CVE-2016-3606: Bolster bytecode verification
- S8155985, CVE-2016-3598: Persistent Parameter Processing
- S8158571, CVE-2016-3610: Additional method handle validation
* debian/rules:
- Create symbolic link in source package (thanks Avinash).
Closes: #832720.
- Use in-tree lcms (LP: #913434)
* debian/
instead of /var/lib/
from binfmts. Closes: #821146.
-- Tiago Stürmer Daitx <email address hidden> Wed, 10 Aug 2016 20:46:47 +0000
Changed in openjdk-7 (Ubuntu): | |
status: | Incomplete → Fix Released |
Launchpad Janitor (janitor) wrote : | #51 |
This bug was fixed in the package openjdk-7 - 7u111-2.
---------------
openjdk-7 (7u111-
* debian/rules:
- fix typo (aarch64 -> arm64) and disable precompiled headers for
arm64
- remove compile file generated by automake during debian cleanup
openjdk-7 (7u111-
* debian/
after the introduction of two new Unsafe methods in the OpenJDK
hotspot. Closes: #833933. (LP: #1611598)
openjdk-7 (7u111-
[ Matthias Klose ]
* Fix handling of /usr/lib/
(Andreas Beckmann). Closes: #821858.
* Add missing includes for aarch64 hotspot backport (building without pch).
* Use in-tree lcms for backports.
[ Tiago Stürmer Daitx ]
* IcedTea release 2.6.7 (based on 7u111):
* Security fixes
- S8079718, CVE-2016-3458: IIOP Input Stream Hooking
- S8145446, CVE-2016-3485: Perfect pipe placement (Windows only)
- S8147771: Construction of static protection domains under Javax
custom policy
- S8148872, CVE-2016-3500: Complete name checking
- S8149962, CVE-2016-3508: Better delineation of XML processing
- S8150752: Share Class Data
- S8151925: Font reference improvements
- S8152479, CVE-2016-3550: Coded byte streams
- S8155981, CVE-2016-3606: Bolster bytecode verification
- S8155985, CVE-2016-3598: Persistent Parameter Processing
- S8158571, CVE-2016-3610: Additional method handle validation
* debian/rules:
- Create symbolic link in source package (thanks Avinash).
Closes: #832720.
- Use in-tree lcms (LP: #913434)
* debian/
instead of /var/lib/
from binfmts. Closes: #821146.
-- Tiago Stürmer Daitx <email address hidden> Thu, 11 Aug 2016 23:28:50 +0000
Changed in openjdk-7 (Ubuntu): | |
status: | Incomplete → Fix Released |
Tiago Stürmer Daitx (tdaitx) wrote : | #52 |
IcedTea #1896 tracks the LCMS 2.7 update. The fix for this bug was tracked under IcedTea #3020.
Changed in openjdk: | |
importance: | Medium → Unknown |
status: | Fix Released → Unknown |
Tiago Stürmer Daitx (tdaitx) wrote : | #53 |
This bug was not related to lcms, but to OpenJDK. Invalidating it for LCMS.
Changed in lcms2 (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in openjdk: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Here is the "error report file" (hs_err_ pid4978. log) from this step (as described above):
$ java BugIIO