Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 5903 invoked from network); 9 Feb 2007 11:49:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 11:49:26 -0000 Received: (qmail 8391 invoked by uid 500); 9 Feb 2007 11:49:33 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 8368 invoked by uid 500); 9 Feb 2007 11:49:33 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 8359 invoked by uid 99); 9 Feb 2007 11:49:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 03:49:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 03:49:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C904F41095B for ; Fri, 9 Feb 2007 03:49:05 -0800 (PST) Message-ID: <1075724.1171021745821.JavaMail.jira@brutus> Date: Fri, 9 Feb 2007 03:49:05 -0800 (PST) From: "Peter Novodvorsky (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3135) [drlvm][threading] unexpected InterruptedException after loading png-image In-Reply-To: <22177137.1170924066139.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471665 ] Peter Novodvorsky commented on HARMONY-3135: -------------------------------------------- Main thread gets interrupted first in ImageDecoder.terminate() (stack trace below), after that interruption flag is set. After that wait in Thread.join() gets interrupted exception right after it calls wait(). Stack trace for ImageDecoder.terminate(): The stack trace of the 0x80bf8b0 java thread: [0x80bf8b0] (nil)(n): java/lang/VMThreadManager.interrupt(Ljava/lang/Thread;)I [0x80bf8b0] 0x52e146d4(m): java/lang/Thread.interrupt()V [0x80bf8b0] 0x52e145c4(m): org/apache/harmony/awt/gl/image/ImageDecoder$1.run()Ljava/lang/Void; [0x80bf8b0] 0x52e14525(m): org/apache/harmony/awt/gl/image/ImageDecoder$1.run()Ljava/lang/Object; [0x80bf8b0] 0x51ce6ed3(m): java/security/AccessController.doPrivilegedImpl(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; [0x80bf8b0] 0x51ce6af9(m): java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object; [0x80bf8b0] 0x52e138e9(m): org/apache/harmony/awt/gl/image/ImageDecoder.terminate()V [0x80bf8b0] 0x52e13278(m): org/apache/harmony/awt/gl/image/DecodingImageSource.removeConsumer(Ljava/awt/image/ImageConsumer;)V [0x80bf8b0] 0x52e13019(m): org/apache/harmony/awt/gl/image/OffscreenImage.stopProduction()V [0x80bf8b0] 0x52e12ecc(m): org/apache/harmony/awt/gl/image/OffscreenImage.imageComplete(I)V [0x80bf8b0] 0x52e12be2(m): org/apache/harmony/awt/gl/image/ImageDecoder.imageComplete(I)V [0x80bf8b0] 0x52e0990f(m): org/apache/harmony/awt/gl/image/PngDecoder.decodeImage()V [0x80bf8b0] 0x52e0811a(m): org/apache/harmony/awt/gl/image/DecodingImageSource.load()V [0x80bf8b0] 0x52e00f4b(m): org/apache/harmony/x/imageio/plugins/png/PNGImageReader.read(ILjavax/imageio/ImageReadParam;)Ljava/awt/image/BufferedImage; [0x80bf8b0] 0x52e008ae(m): org/apache/harmony/x/imageio/plugins/png/PNGImageReader.read(I)Ljava/awt/image/BufferedImage; [0x80bf8b0] 0x52ae1c91(m): javax/imageio/ImageIO.read(Ljavax/imageio/stream/ImageInputStream;)Ljava/awt/image/BufferedImage; [0x80bf8b0] 0x52add3b3(m): javax/imageio/ImageIO.read(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage; [0x80bf8b0] 0x52894315(m): HARMONY3135.main([Ljava/lang/String;)V This seems to be an AWT bug (if awt calls interrupt() for main thread it should clear interrupted flag somewhere). Concerning Gregory's comment, IBM VME runs unsuccessful with this test pretty often (50% of cases) with the following trace: Exception in thread "main" java.lang.RuntimeException: Decompression Error at org.apache.harmony.awt.gl.image.PngDecoder.decode(Native Method) at org.apache.harmony.awt.gl.image.PngDecoder.decodeImage(PngDecoder.java:110) at org.apache.harmony.awt.gl.image.DecodingImageSource.load(DecodingImageSource.java:252) at org.apache.harmony.x.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:84) at org.apache.harmony.x.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:90) at javax.imageio.ImageIO.read(ImageIO.java:249) at javax.imageio.ImageIO.read(ImageIO.java:222) at HARMONY3135.main(HARMONY3135.java:16) I think that IBMVME triggers some other bug before even reaching terminate() function and so this result doesn't show that previous bug is DRLVM specific. > [drlvm][threading] unexpected InterruptedException after loading png-image > -------------------------------------------------------------------------- > > Key: HARMONY-3135 > URL: https://issues.apache.org/jira/browse/HARMONY-3135 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: win32 > Reporter: Evgeniya Maenkova > Priority: Critical > Attachments: golden_0400.png, Sync.java > > > The test is: (to be attached) > import java.io.IOException; > import java.net.URL; > > import javax.imageio.ImageIO; > > public class Sync { > > public static void main(String[] args) { > URL imageURL = Sync.class.getResource("golden_0400.png"); > System.out.println(imageURL); > try { > ImageIO.read(imageURL.openStream()); > } catch (IOException e) { > } > > Thread b = new Thread(); > b.start(); > try { > b.join(); > } catch (Exception e) { > System.out.println((e instanceof InterruptedException)); > e.printStackTrace(); > } > > int res = 1; > for (int i = 1; i < 10000; i ++) { > res = (res * i) % 107 + 1; > } > System.out.println("End " + res); > > } > } > > DRL vm output: > C:\ecl_311_ws\Test>C:\Harmony\trunk\working_vm\build\deploy\jdk\jre\bin\java -Xem:server Sync > file:/C:/ecl_311_ws/Test/./golden_0400.png > true > java.lang.InterruptedException > at java.lang.Object.wait(Object.java:100) > at java.lang.Thread.join(Thread.java:591) > at Sync.main(Sync.java:19) > End 26 > > RI output: > file:/C:/ecl_311_ws/Test/golden_0400.png > End 26 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.