JDK-4915527 : Regression-test sun/java2d/volatileImage/LineClipTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2003-09-01
  • Updated: 2004-01-26
  • Resolved: 2004-01-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b36Fixed
Related Reports
Relates :  
Relates :  
Description

Name: iaR10016			Date: 09/01/2003


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.5.0-b17, JDK1.5.0-b16
Testbase       : Regression-test
Platform[s]    : RedHat Advanced Server 2.1 (Gnome), Suse Linux 8.2 (Gnome2), Suse Linux 8.1 (Gnome2)
                  (not reproducible on Solaris sparc, Solaris x86, Windows systems I have)
switch/Mode    : -server
Falling test[s]: sun/java2d/volatileImage/LineClipTest.java

Regression-test test sun/java2d/volatileImage/LineClipTest.java test fails with timeout
using JDK1.5.0-b17 with "-server" switch on Linux even if timeout factor is 5. The test
works fine and passes in "-client" mode on the same machines.

Test source location:
=====================
/java/re/jdk/1.5.0/promoted/latest/ws/j2se/test/sun/java2d/volatileImage/LineClipTest.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b17/regtest/linux/redhat_advserver21_gnome_smp_linux-24/workDir/test/sun/java2d/volatileImage/LineClipTest.jtr

How to reproduce:
=================
Run the following script (you may need to change it's variables):
--- script start ---
#!/bin/sh
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
JT_HOME=/net/koori/onestop/jct-tools/3.1.2/archive/fcs/binaries
J_HOME=/net/koori/onestop/jdk/1.5.0/promoted/all/b17
JAVA_HOME=${J_HOME}/binaries/linux-i586
TEST_BASE_PATH=${J_HOME}/ws/j2se/test
TESTVMOPTS="-server"
CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
TEST="sun/java2d/volatileImage/LineClipTest.java"

mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
#rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
cd $WORK_DIR/scratch

$JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-24" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"
--- script end ---

Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(0/0)----------
result: Failed. Execution failed: Program `/net/linux-15/export/home/java/jdk1.5.0/linux/bin/java' interrupted! (timed out?)

Specific machine info:
======================
Hostname: linux-24
OS: RedHat Advanced Server 2.1 (Gnome)
Hostname: linux-2
OS: Suse Linux 8.2 (Gnome2)

======================================================================

Name: vsR10238			Date: 09/05/2003


This test also fails on our Solaris 10 (x86) box (CDE)
(SunOS linux-18 5.10 s10_36 i86pc i386 i86pc)
with JDK1.5.0(tested with b15-b18)
producing the following output in its jtr:

----------System.out:(1/7)----------
PASSED
----------System.err:(33/2234)----------
STATUS:Passed.
java.lang.ClassCastException: sun.awt.image.WritableRasterNative
	at sun.awt.image.BufImgSurfaceData.createDataBC(BufImgSurfaceData.java:259)
	at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:108)
	at sun.awt.image.VolatileSurfaceManager.getBackupSurface(VolatileSurfaceManager.java:243)
	at sun.awt.image.VolatileSurfaceManager.restoreContents(VolatileSurfaceManager.java:265)
	at sun.java2d.SurfaceData.restoreContents(SurfaceData.java:122)
	at sun.awt.X11SurfaceData$X11PixmapSurfaceData.getReplacement(X11SurfaceData.java:522)
	at sun.java2d.pipe.DrawImage.renderSurfaceData(DrawImage.java:354)
	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:65)
	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:48)
	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:732)
	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2804)
	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2794)
	at LineClipTest.paint(LineClipTest.java:276)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
	at java.awt.Container.paint(Container.java:1647)
	at sun.awt.RepaintArea.paintComponent(RepaintArea.java:201)
	at sun.awt.RepaintArea.paint(RepaintArea.java:177)
	at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:391)
	at java.awt.Component.dispatchEventImpl(Component.java:3995)
	at java.awt.Container.dispatchEventImpl(Container.java:1962)
	at java.awt.Window.dispatchEventImpl(Window.java:1729)
	at java.awt.Component.dispatchEvent(Component.java:3770)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:214)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
STATUS:Failed.`main' threw exception: java.lang.ClassCastException: sun.awt.image.WritableRasterNative


======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b36 tiger-beta2
14-06-2004

SUGGESTED FIX *** /tmp/geta639 Wed Jan 14 16:54:52 2004 --- LineClipTest.java Wed Jan 14 16:45:35 2004 *************** *** 150,156 **** (imageChecker.getHeight() != testH)) { // Recreate BufferedImage as necessary ! imageChecker = (BufferedImage)createImage(getWidth(), getHeight()); } // Copy buffer to BufferedImage Graphics gChecker = imageChecker.getGraphics(); --- 150,161 ---- (imageChecker.getHeight() != testH)) { // Recreate BufferedImage as necessary ! GraphicsConfiguration gc = getGraphicsConfiguration(); ! ColorModel cm = gc.getColorModel(); ! WritableRaster wr = ! cm.createCompatibleWritableRaster(getWidth(), getHeight()); ! imageChecker = new BufferedImage(cm, wr, ! cm.isAlphaPremultiplied(), null); } // Copy buffer to BufferedImage Graphics gChecker = imageChecker.getGraphics(); ###@###.### 2004-01-14
14-01-2004

WORK AROUND Run the test with -Dsun.java2d.pmoffscreen=false ###@###.### 2004-01-14
14-01-2004

EVALUATION There are two issues here. The first is the timeout issue with the -server VM. I've found that this test takes around 3 minutes to complete on my 900 MHz SunBlade, so I wouldn't be surprised if it takes over 5 minutes on other less powerful machines. But it appears that the timeout is already set to 10 minutes, so I don't know what the answer is here. I'm marking this "incomplete" pending more information from the submitter (CPU information for the machine that is timing out, etc). Also, if the submitter could please run the LineClipTest directly (outside jtreg) with the -server flag, and time how long it takes for the test to complete, I'll have a better idea whether this test just takes a long time to complete on that config, or if it just never finishes. The other issue here is the ClassCastException that is thrown at the end of the test. It appears that X11PixmapSurfaceData.getReplacement() is being invoked, even though there is a comment there to the effect of "this should never be called". It's not clear yet why this is being called (possible InvalidPipeException during the drawImage() call), but the effect is that we attempt to get a BufImgSurfaceData from an X11RemoteOffScreenImage. It seems that this is not possible since BufImgSurfaceData does not know how to handle the special WritableRasterNative that is part of the X11ROSI. ###@###.### 2003-09-11 Based on Irina's latest comments, it sounds like the hang issue is only with the -server option on SuSE Linux 8+. Could possibly be a VM issue. ###@###.### 2003-09-12 I've filed a separate bug (4931726) for the second issue mentioned above (ClassCastException on Solaris 10 x86), as that appears to be a separate 2D issue. The first issue here (hang with -server on SuSE Linux 8) appears to be a VM issue, so I'm transferring to the HotSpot team for investigation. ###@###.### 2003-10-02 ====================== I can not get this bug to run, I get this: Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javatest/regtest/Main ###@###.### 2003-11-05 ===================== This test runs fine if it is run remotely and not xdisplayed. I ran it on my RH machine and it passed, and I ran it on my sparc machine and it passed. I'll close this as "not a bug" unless someone has other suggestions ###@###.### 2003-11-11 ============================ From what I've been able to see, this bug is reproducable using "-server", "-client" and "-Xint". This can not be a compiler/VM bug, and is most likely a libraries issue. ###@###.### 2003-12-05 ============================ I ran this on a SUSE box, and it passed epiphone:/tmp # ksh line.ksh JavaTest HTTPd - Success, active on port 1903 JavaTest HTTPd server available at http://10.5.8.135:1903/ runner starting test: sun/java2d/volatileImage/LineClipTest.java runner finished test: sun/java2d/volatileImage/LineClipTest.java Passed. Execution successful Test results: passed: 1 Report written to /tmp/reportDir/report.html Results written to /tmp/workDir/test The test always passes if I'm running the test locally, but fails if I XDisplay it. Seems like a problem with AWT/2D or an X issue. ###@###.### 2004-01-09 When run remotely the app is not hanging, it's just working very very slowly, which can be attributed to bug 4835595: PixelGrabber.grabPixels runs up to 600 times slower on JDK1.4.1 than on JDK1.3.1 That is, after each line the test gets grabs the pixels of the test image, which uses NativeDataBuffer, which uses XGetImage for each pixel in the image (RemoteOffScreenImage). The workaround for this particular test would be to use BufferedImage instead of managec one. I can't reproduce the ClassCastException yet. In any case, I don't believe that this should be a P2 or a red bug for that matter. The 'hanging' behavior is not new in 1.5, it's been like this since 1.4. ###@###.### 2004-01-14
14-01-2004