ImageIO crashes (core dumped) while reading many image files

Bug #913434 reported by Joshua Rocky Tuahta Purba on 2012-01-08
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
OpenJDK
Confirmed
Medium
lcms2 (Ubuntu)
Undecided
Unassigned
openjdk-7 (Ubuntu)
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=0x00007fb5babe31f8, pid=4978, tid=140418842154752
#
# 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-2.0-0ubuntu0.11.10.1
# Problematic frame:
# C [liblcms2.so.2+0x121f8] cmsSaveProfileToIOhandler+0x38
#
# Core dump written. Default location: /home/joshua/core or core.4978
#
# An error report file with more information is saved as:
# /home/joshua/hs_err_pid4978.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
#
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.0-0ubuntu0.11.10.1) (tested on oneiric).
2. This bug does *not* affect OpenJDK 6 (6b23~pre11-0ubuntu1.11.10) (tested on oneiric).

Here is the "error report file" (hs_err_pid4978.log) from this step (as described above):

$ java BugIIO

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

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 :

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.java/NoBugIIO.java) causes an exception: java.lang.IllegalArgumentException: Can't load standard profile: sRGB.pf.
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.cmm.lcms.LCMS.getTagData(JI[B)V+0 (same as original report).

Using other images (without sRGB profile - checked with exiftool) or openjdk6 does not cause crashes or exceptions.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjdk-7 (Ubuntu):
status: New → Confirmed
Hendy Irawan (ceefour) wrote :

Still happens on Ubuntu 12.04, tested i386

java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)

Carlo (john23) wrote :

Happens on ubuntu 12.04 x64 too.

java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

I've found this issue happens intermitently on my setup:
Ubuntu 13.04 64-bit
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.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.newFixedThreadPool(Runtime.getRuntime().availableProcessors()+1);

Image decode tasks added this:
 ImageScaler scaler = new ImageScaler(size);
 threadpool.submit(scaler);

ImageScaler class is:
 private class ImageScaler extends SwingWorker<ImageIcon, String> {
  private int size;

  public ImageScaler(int size) {
   this.size = size;
  }

  @Override
  public ImageIcon doInBackground() {
   LOGGER.log(Level.FINE,
     "Loading image: "+url);

   ImageReader ir;

   //create a new instance of imageReader
   synchronized(sync){
    Iterator<ImageReader> it = ImageIO.getImageReadersByMIMEType("image/jpeg");
    ir = it.next();
    if (ir == null) {
     LOGGER.log(Level.SEVERE,
       "No image reader found for JPEGs");
     System.exit(1);
    }
    ImageReaderSpi spi = ir.getOriginatingProvider();
    try {
     ir = spi.createReaderInstance();
    } catch (Exception e) {
     LOGGER.log(Level.SEVERE,
       "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.mkdirs();
    URL u = new URL(url);
    FileCacheImageInputStream fcis = new FileCacheImageInputStream(
     u.openStream(), cacheDir);
    ir.setInput(fcis);
    image = ir.read(0);
    fcis.close();
   } catch (Exception e) {
    LOGGER.log(Level.WARNING,
      "Could not read image "+url, e);
    return null;
   } catch (OutOfMemoryError e) {
    LOGGER.log(Level.WARNING,
      "Out of memory reading image: "+url, e);
    return null;
   } finally {
    ir.dispose();
   }

   return new ImageIcon(resizeImage(image, size));
   }

  @Override
  protected void done() {
   if (isCancelled())
    return;
   ImageIcon icon = null;
   try {
    icon = get();
   } catch (Exception ignore) {}
   if (icon == null) {
    LOGGER.log(Level.WARNING,
      "Scaled image is null: "+url);
    return;
   }
   rendered = icon;
   renderedSize = size;
   mPcs.firePropertyChange(PNAME_RENDEREDICON, 0, 1);
  }

 }

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.

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.so.2+0x121f8] cmsSaveProfileToIOhandler+0x38

From your log:

# Problematic frame:
# C [liblcms2.so.2+0x153c5] cmsSaveProfileToIOhandler+0x35

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.cmm.lcms.LCMS.getTagData(JI[B)V+0
j java.awt.color.ICC_Profile.getData(JI)[B+26
j java.awt.color.ICC_Profile.getData(I)[B+14
j java.awt.color.ICC_Profile.getNumComponents()I+18
j sun.java2d.cmm.lcms.LCMSTransform.<init>(Ljava/awt/color/ICC_Profile;II)V+83
j sun.java2d.cmm.lcms.LCMS.createTransform(Ljava/awt/color/ICC_Profile;II)Lsun/java2d/cmm/ColorTransform;+7
j java.awt.color.ICC_ColorSpace.fromRGB([F)[F+37
j com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(IIIII[B)V+158
v ~StubRoutines::call_stub
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(JZZ)Z+0
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(Z)Z+12
j com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly()V+92
j com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(I)V+41
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(IZ)V+2
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(ILjavax/imageio/ImageReadParam;Z)Ljava/awt/image/Raster;+3

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.cmm.lcms.LCMS.getTagData(JI[B)V+0
j java.awt.color.ICC_Profile.getData(JI)[B+26
j java.awt.color.ICC_Profile.getData(I)[B+14
j java.awt.color.ICC_Profile.getNumComponents()I+18
j sun.java2d.cmm.lcms.LCMSTransform.<init>(Ljava/awt/color/ICC_Profile;II)V+102
j sun.java2d.cmm.lcms.LCMS.createTransform(Ljava/awt/color/ICC_Profile;II)Lsun/java2d/cmm/ColorTransform;+7
j java.awt.color.ICC_ColorSpace.fromRGB([F)[F+37
j com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(IIIII[B)V+158
v ~StubRoutines::call_stub
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(JZZ)Z+0
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(Z)Z+12
j com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly()V+92
j com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(I)V+41
j com.sun.imageio.plugins.jpeg.JPEGImageReader.getImageMetadata(I)Ljavax/imageio/metadata/IIOMetadata;+39
j uk.co.netriver.kedarserver.CatwalkingImageProcessorTask.extractMetadata([BLjavax/imageio/ImageReader;)Ljava/util/LinkedList;+16
j uk.co.netriver.kedarserver.CatwalkingImageProcessorTask.doTask()V+623
j uk.co.netriver.kedarserver.TaskProcessor.run()V+44
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub

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.NullPointerException
 at java.awt.color.ICC_Profile.intFromBigEndian(ICC_Profile.java:1770)
 at java.awt.color.ICC_Profile.getNumComponents(ICC_Profile.java:1462)
 at sun.java2d.cmm.lcms.LCMSTransform.<init>(LCMSTransform.java:96)
 at sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:66)
 at java.awt.color.ICC_ColorSpace.fromRGB(ICC_ColorSpace.java:218)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(JPEGImageReader.java:689)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:604)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:342)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:476)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:597)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1054)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1034)
 at javax.imageio.ImageReader.read(ImageReader.java:940)

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/[...]/VALI_RTW_AW13_3026.jpg
java.awt.color.CMMException: Cannot get color transform
 at sun.java2d.cmm.lcms.LCMS.createNativeTransform(Native Method)
 at sun.java2d.cmm.lcms.LCMSTransform.doTransform(LCMSTransform.java:149)
 at sun.java2d.cmm.lcms.LCMSTransform.colorConvert(LCMSTransform.java:526)
 at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:571)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1258)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1226)
 at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1034)
 at javax.imageio.ImageReader.read(ImageReader.java:940)
 at uk.co.netriver.kedarclient.data.Photo$ImageScaler.doInBackground(Photo.java:510)
 at uk.co.netriver.kedarclient.data.Photo$ImageScaler.doInBackground(Photo.java:1)
 at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at javax.swing.SwingWorker.run(SwingWorker.java:335)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:724)

Katerina (katerina-andreadou) wrote :

I am getting the same error when reading many images from different URLs
BufferedImage image = ImageIO.read(myUrl);
Is there any available fix for this issue?

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.java2d.cmm.lcms.LCMS.getTagData(JI[B)V+0
j java.awt.color.ICC_Profile.getData(JI)[B+26
j java.awt.color.ICC_Profile.getData(I)[B+14
j java.awt.color.ICC_Profile.getNumComponents()I+18
j sun.java2d.cmm.lcms.LCMSTransform.<init>(Ljava/awt/color/ICC_Profile;II)V+83
j sun.java2d.cmm.lcms.LCMS.createTransform(Ljava/awt/color/ICC_Profile;II)Lsun/java2d/cmm/ColorTransform;+7
j java.awt.color.ICC_ColorSpace.fromRGB([F)[F+37
j com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(IIIII[B)V+158
v ~StubRoutines::call_stub
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(JZZ)Z+0
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(Z)Z+12
j com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly()V+92
j com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(I)V+41
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(IZ)V+2
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(ILjavax/imageio/ImageReadParam;Z)Ljava/awt/image/Raster;+3
j com.sun.imageio.plugins.jpeg.JPEGImageReader.read(ILjavax/imageio/ImageReadParam;)Ljava/awt/image/BufferedImage;+15
j javax.imageio.ImageIO.read(Ljavax/imageio/stream/ImageInputStream;)Ljava/awt/image/BufferedImage;+55
j javax.imageio.ImageIO.read(Ljava/net/URL;)Ljava/awt/image/BufferedImage;+42

I don't think there is any fix yet.

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.so.2+0x15480] cmsGetColorSpace+0x0
C [liblcms2.so.2+0x159b5] cmsSaveProfileToIOhandler+0x25

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.out.print( "." );
    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
        }

*** Bug 1897 has been marked as a duplicate of this bug. ***

Seems this is a problem of liblcms2-2.5. As Marti told me 2.6 is tested for multithreading.

CLosing this then, if it's an issue with the native library.

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=0x00007fc008813965, pid=1482, tid=140462821066496
#
# 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.so.2+0x15965] cmsSaveProfileToIOhandler+0x25

Josef Pacula (josef-pacula) wrote :

We are getting the same problem, happening on https://d1oc2d5bw2auvq.cloudfront.net/static-assets-prod/9f99a5cf-2f54-49e0-8aff-7a14c78775d1 (jpeg), but with:

$ java -version
java version "1.6.0_32"
OpenJDK Runtime Environment (IcedTea6 1.13.4) (6b32-1.13.4-4ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

The stack trace follows:

java.awt.color.CMMException: Cannot get color transform
     at sun.java2d.cmm.lcms.LCMS.createNativeTransform(Native Method)
     at sun.java2d.cmm.lcms.LCMSTransform.<init>(LCMSTransform.java:103)
     at sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:75)
     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:552)
     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1281)
     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1249)
     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1052)
     at javax.imageio.ImageIO.read(ImageIO.java:1438)
     at javax.imageio.ImageIO.read(ImageIO.java:1390)

no longer affects: openjdk-6 (Ubuntu)
Changed in openjdk:
importance: Unknown → Medium
status: Unknown → Invalid

*** Bug 2115 has been marked as a duplicate of this bug. ***

Jamie Maher (jmaher-guser) wrote :

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."

Re-opening this because this version of LCMS (2.5) is used in-tree when --disable-system-lcms is passed. We should upgrade using:

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

details: http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=2f4ec76e886c
author: prr
date: Thu Sep 04 13:00:55 2014 -0700

 8056122, PR1896: Upgrade JDK to use LittleCMS 2.6
 Reviewed-by: bae, jgodinez

details: http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=a5d72541512e
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

details: http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=ad4f5afc21dc
author: prr
date: Mon May 11 09:14:03 2015 -0700

 8078331, PR1896: Upgrade JDK to use LittleCMS 2.7
 Reviewed-by: serb, bae

details: http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=96f40a21d715
author: prr
date: Thu Jun 11 12:23:47 2015 -0700

 8081756, PR1896: Mastering Matrix Manipulations
 Reviewed-by: serb, bae, mschoene

details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=55e6b27c9e62
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_CHANGESET): Update to icedtea-2.7.0pre02.
  (JAXP_CHANGESET): Likewise.
  (JAXWS_CHANGESET): Likewise.
  (JDK_CHANGESET): Likewise.
  (LANGTOOLS_CHANGESET): Likewise.
  (OPENJDK_CHANGESET): Likewise.
  (CORBA_SHA256SUM): Likewise.
  (JAXP_SHA256SUM): Likewise.
  (JAXWS_SHA256SUM): Likewise.
  (JDK_SHA256SUM): Likewise.
  (LANGTOOLS_SHA256SUM): Likewise.
  (OPENJDK_SHA256SUM): Likewise.
  * 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_awt/Graphics/index.html#DrawLine fails with OOM for jdk8 with XRender pipeline
   - S8011709, PR2509: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
   - S8023052, PR2509: JVM crash in native layout
   - S8042855, PR2509: [parfait] Potential null pointer dereference in IndicLayoutEngine.cpp
   - 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.StackOverflowError on Zero JVM initialization on non x86 platforms.

details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=8228c96258df
author: prr
date: Thu Sep 04 13:00:55 2014 -0700

 8056122, PR1896: Upgrade JDK to use LittleCMS 2.6
 Reviewed-by: bae, jgodinez

details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=d33d77131673
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

details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=8199f031c28c
author: prr
date: Mon May 11 09:14:03 2015 -0700

 8078331, PR1896: Upgrade JDK to use LittleCMS 2.7
 Reviewed-by: serb, bae

details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=2ee1950a8d08
author: prr
date: Thu Jun 11 12:23:47 2015 -0700

 8081756, PR1896: Mastering Matrix Manipulations
 Reviewed-by: serb, bae, mschoene

Download full text (8.9 KiB)

details: http://icedtea.classpath.org//hg/release/icedtea7-2.6?cmd=changeset;node=723ef630c332
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-&gt;has_finalizer(),&quot;inconsistent has_finalizer&quot;) with debug VM
   - S7011441, PR2674: jndi/ldap/Connection.java needs to avoid spurious wakeup
   - 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.pkcs11.SessionManager is scalability blocker
   - 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_awt/Graphics/index.html#DrawLine fails with OOM for jdk8 with XRender pipeline
   - S7152582, PR2674: PKCS11 tests should use the NSS libraries available in the OS
   - S7156085, PR2674: ArrayIndexOutOfBoundsException throws in UTF8Reader of SAXParser
   - S7177045, PR2674: Rework the TestProviderLeak.java regression test, it is too fragile to low memory errors.
   - S7190945, PR2674: pkcs11 problem loading NSS libs on Ubuntu
   - S8005226, PR2674: java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java fails intermittently
   - S8009438, PR2674: sun/security/pkcs11/Secmod tests failing on Ubuntu 12.04
   - S8011709, PR2509: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
   - 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_ACCESS_VIOLATION on debugging String.contentEquals()
   - 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/jmxremote/bootstrap/RmiBootstrapTest.sh Failed to initialize connector
   - S8027624, PR2674: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again
   - S8033069, PR2674: mouse wheel scroll closes combobox popup
   - S8035150, PR2674: ShouldNotReachHere() in ConstantPool::copy_entry_to
   - S8039212, PR2674: SecretKeyBasic.sh needs to avoid NSS libnss3 and libsoftokn3 version mismatches
   - S8042855, PR2509: [parfait] Potential null pointer dereference in IndicLayoutEngine.cpp
   - S8044364, PR2674: runtime/RedefineFinalizer test fails on windows
   - ...

Read more...

Changed in openjdk:
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lcms2 (Ubuntu):
status: New → Confirmed
Mauro (mauromol) wrote :

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-7-jre-headless version 7u101-2.6.6-0ubuntu0.14.04.1 with IcedTea 2.6.6 but liblcms2-2 is still at version 2.5 (precisely 2.5-0ubuntu4.1). Does this mean that IcedTea in Trusty is using an "unsupported" version of LittleCMS?

Today I faced this problem (the JVM crashed).

Tiago Stürmer Daitx (tdaitx) wrote :

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 :

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 :

Just an additional note: this happened with openjdk-7-7u95-2.6.4 (with IcedTea 2.6.4), I installed 7u101 only today, but I saw there's no version change in liblcms2-2 (still 2.5), which seems to be the root cause of this problem.

Tiago Stürmer Daitx (tdaitx) wrote :

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 :

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.

I was able to reproduce this issue on Ubuntu's IcedTea 2.6.6 running:
- the integrated lcms library (disable-system-lcms)
- lcms 2.5 and 2.6 system library (enable-system-lcms)

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://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/913434).

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?

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).

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://drive.google.com/open?id=0Bw-FF32TRkU3MFdFOXF4dlZ0c2s

Mauro (mauromol) wrote :

Thank you Tjago, I will monitor upstream too!

Changed in openjdk:
status: Fix Released → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.