harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Novodvorsky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3135) [drlvm][threading] unexpected InterruptedException after loading png-image
Date Fri, 09 Feb 2007 11:49:05 GMT

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


Mime
View raw message