[Bug 1896] New: IMAGEIO / liblcms2-2 crashes when used multithreaded

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Fri Aug 8 10:45:38 UTC 2014


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1896

            Bug ID: 1896
           Summary: IMAGEIO / liblcms2-2 crashes when used multithreaded
           Product: IcedTea
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: IcedTea
          Assignee: gnu.andrew at redhat.com
          Reporter: f.bantner at axon-e.de
                CC: unassigned at icedtea.classpath.org

Created attachment 1142
  --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1142&action=edit
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
        }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140808/9c25244e/attachment.html>


More information about the distro-pkg-dev mailing list