All of lore.kernel.org
 help / color / mirror / Atom feed
* Java Problems
@ 2005-08-12  3:03 Peter
  0 siblings, 0 replies; 9+ messages in thread
From: Peter @ 2005-08-12  3:03 UTC (permalink / raw)
  To: xen-devel; +Cc: xen

Hi.  This post follows on from:
http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00185.html

And is possibly related to the bug referenced here:
http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4335360

In summary: Java processes are doing odd things.

1) It appears that number values are mysteriously changing.  e.g. if you 
look at the Hashtable error there is no way the IllegalArgumentException 
could be thrown, unless the float value passed into a function is being 
corrupted somehow on the stack.

2) I'm seeing JVM crashes (e.g. the ColorModel crash below).  I'm seeing 
other crashes inside native code methods in other apps I'm running.

I've tried this with/without /lib/tls.  And on a RHEL4 and Debian Sarge 
DomU.

I don't see either problem when the same app runs on a non-Xen server.

Guesswork: I notice that SSE comes up in related to other reports of 
this bug (http://www.tommesani.com/SSE.html, 
http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4948500). 
Perhaps there is some kind of register corruption going on?  Or 
something that could corrupt float arguments on the stack?  And if 
that's the case then this could be something with wider implications 
than just Java processes.

Does anyone have any ideas what it might be?  If you're interested in 
tracking it down, the following test case may help.

Regards, Peter
http://rimuhosting.com - Xen VPS Hosting


# prerequisite you'll need to install a 1.5 JDK from sun
# host is Xen 2.0.6
# uname -r
2.6.11.10-xenU-rimu1
#  wget http://downloads.rimuhosting.com/FillTest.java
#  javac -target 1.4 -source 1.4 FillTest.java; while true; do java 
-client -Djava.awt.headless=true FillTest; ret=$?; if [ $? -ne 0 ]; then 
echo ret=$ret; break; fi; done
iteration 1
iteration 100001
iteration 200001
Exception in thread "main" java.lang.IllegalArgumentException: Width (7) 
and height (-2147483648) cannot be <= 0
         at 
java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
         at java.awt.image.BufferedImage.<init>(BufferedImage.java:314)
         at FillTest.test(FillTest.java:19)
         at FillTest.main(FillTest.java:11)
iteration 1
iteration 100001
iteration 1500001
Exception in thread "main" java.lang.IllegalArgumentException: Illegal 
Load: NaN
         at java.util.Hashtable.<init>(Hashtable.java:160)
         at java.util.Hashtable.<init>(Hashtable.java:186)
         at 
sun.awt.image.CachingSurfaceManager.<init>(CachingSurfaceManager.java:163)
         at 
sun.awt.motif.X11CachingSurfaceManager.<init>(X11CachingSurfaceManager.java:57)
         at 
sun.java2d.SurfaceManagerFactory.createCachingManager(SurfaceManagerFactory.java:38)
         at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:69)
         at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:45)
         at sun.java2d.SurfaceData.getDestSurfaceData(SurfaceData.java:113)
         at 
sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:337)
         at 
sun.java2d.HeadlessGraphicsEnvironment.createGraphics(HeadlessGraphicsEnvironment.java:77)
         at 
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1143)
         at FillTest.test(FillTest.java:20)
         at FillTest.main(FillTest.java:11)
iteration 1
iteration 100001
iteration 1200001
iteration 1300001
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x439437dd, pid=20786, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
# Problematic frame:
# J  java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V
#
# An error report file with more information is saved as hs_err_pid20786.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
iteration 1
iteration 100001
iteration 200001
iteration 300001
iteration 700001
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x439437dd, pid=22123, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
# Problematic frame:
# J  java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V
#
# An error report file with more information is saved as hs_err_pid22123.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
iteration 1
iteration 100001
iteration 200001
iteration 1100001
iteration 1200001
Exception in thread "main" java.lang.IllegalArgumentException: Illegal 
Load: NaN
         at java.util.Hashtable.<init>(Hashtable.java:160)
         at java.util.Hashtable.<init>(Hashtable.java:186)
         at 
sun.awt.image.CachingSurfaceManager.<init>(CachingSurfaceManager.java:163)
         at 
sun.awt.motif.X11CachingSurfaceManager.<init>(X11CachingSurfaceManager.java:57)
         at 
sun.java2d.SurfaceManagerFactory.createCachingManager(SurfaceManagerFactory.java:38)
         at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:69)
         at sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:45)
         at sun.java2d.SurfaceData.getDestSurfaceData(SurfaceData.java:113)
         at 
sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:337)
         at 
sun.java2d.HeadlessGraphicsEnvironment.createGraphics(HeadlessGraphicsEnvironment.java:77)
         at 
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1143)
         at FillTest.test(FillTest.java:20)
         at FillTest.main(FillTest.java:11)
iteration 1
iteration 100001





iteration 400001
iteration 500001
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x43adbbdd, pid=26268, tid=16384
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
# Problematic frame:
# j  java.awt.image.SinglePixelPackedSampleModel.<init>(IIII[I)V+62
#
# An error report file with more information is saved as hs_err_pid26268.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#


iteration 500001
Exception in thread "main" java.lang.IllegalArgumentException: 
Dimensions (width=1 height=7) are too large
         at java.awt.image.SampleModel.<init>(SampleModel.java:112)
         at 
java.awt.image.SinglePixelPackedSampleModel.<init>(SinglePixelPackedSampleModel.java:124)
         at java.awt.image.Raster.createPackedRaster(Raster.java:770)
         at java.awt.image.Raster.createPackedRaster(Raster.java:466)
         at 
java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at java.awt.image.BufferedImage.<init>(BufferedImage.java:314)
         at FillTest.test(FillTest.java:19)
         at FillTest.main(FillTest.java:11)
iteration 1
iteration 100001

iteration 400001
iteration 500001
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x43adbbdd, pid=24844, tid=16384
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
# Problematic frame:
# j 
java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V+221
#
# An error report file with more information is saved as hs_err_pid24844.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted


iteration 1100001
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x43adbbdd, pid=24479, tid=16384
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
# Problematic frame:
# j 
java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V+221
#
# An error report file with more information is saved as hs_err_pid24479.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Java Problems
@ 2005-08-12  8:16 Ian Pratt
  2005-08-12  9:35 ` Peter
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Pratt @ 2005-08-12  8:16 UTC (permalink / raw)
  To: Peter, xen-devel; +Cc: xen


Do you use our -xen0 / -xenU kernels or compile your own?
Can you reproduce this on 2.0.7 or unstable ?

Thanks,
Ian

> Hi.  This post follows on from:
> http://lists.xensource.com/archives/html/xen-devel/2005-04/msg
> 00185.html
> 
> And is possibly related to the bug referenced here:
> http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4335360
> 
> In summary: Java processes are doing odd things.
> 
> 1) It appears that number values are mysteriously changing.  
> e.g. if you 
> look at the Hashtable error there is no way the 
> IllegalArgumentException 
> could be thrown, unless the float value passed into a 
> function is being 
> corrupted somehow on the stack.
> 
> 2) I'm seeing JVM crashes (e.g. the ColorModel crash below).  
> I'm seeing 
> other crashes inside native code methods in other apps I'm running.
> 
> I've tried this with/without /lib/tls.  And on a RHEL4 and 
> Debian Sarge 
> DomU.
> 
> I don't see either problem when the same app runs on a non-Xen server.
> 
> Guesswork: I notice that SSE comes up in related to other reports of 
> this bug (http://www.tommesani.com/SSE.html, 
> http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4948500). 
> Perhaps there is some kind of register corruption going on?  Or 
> something that could corrupt float arguments on the stack?  And if 
> that's the case then this could be something with wider implications 
> than just Java processes.
> 
> Does anyone have any ideas what it might be?  If you're interested in 
> tracking it down, the following test case may help.
> 
> Regards, Peter
> http://rimuhosting.com - Xen VPS Hosting
> 
> 
> # prerequisite you'll need to install a 1.5 JDK from sun
> # host is Xen 2.0.6
> # uname -r
> 2.6.11.10-xenU-rimu1
> #  wget http://downloads.rimuhosting.com/FillTest.java
> #  javac -target 1.4 -source 1.4 FillTest.java; while true; do java 
> -client -Djava.awt.headless=true FillTest; ret=$?; if [ $? 
> -ne 0 ]; then 
> echo ret=$ret; break; fi; done
> iteration 1
> iteration 100001
> iteration 200001
> Exception in thread "main" 
> java.lang.IllegalArgumentException: Width (7) 
> and height (-2147483648) cannot be <= 0
>          at 
> java.awt.image.DirectColorModel.createCompatibleWritableRaster
> (DirectColorModel.java:999)
>          at 
> java.awt.image.BufferedImage.<init>(BufferedImage.java:314)
>          at FillTest.test(FillTest.java:19)
>          at FillTest.main(FillTest.java:11)
> iteration 1
> iteration 100001
> iteration 1500001
> Exception in thread "main" 
> java.lang.IllegalArgumentException: Illegal 
> Load: NaN
>          at java.util.Hashtable.<init>(Hashtable.java:160)
>          at java.util.Hashtable.<init>(Hashtable.java:186)
>          at 
> sun.awt.image.CachingSurfaceManager.<init>(CachingSurfaceManag
> er.java:163)
>          at 
> sun.awt.motif.X11CachingSurfaceManager.<init>(X11CachingSurfac
> eManager.java:57)
>          at 
> sun.java2d.SurfaceManagerFactory.createCachingManager(SurfaceM
> anagerFactory.java:38)
>          at 
> sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:69)
>          at 
> sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:45)
>          at 
> sun.java2d.SurfaceData.getDestSurfaceData(SurfaceData.java:113)
>          at 
> sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEn
> vironment.java:337)
>          at 
> sun.java2d.HeadlessGraphicsEnvironment.createGraphics(Headless
> GraphicsEnvironment.java:77)
>          at 
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1143)
>          at FillTest.test(FillTest.java:20)
>          at FillTest.main(FillTest.java:11)
> iteration 1
> iteration 100001
> iteration 1200001
> iteration 1300001
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x439437dd, pid=20786, tid=16384
> #
> # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed 
> mode, sharing)
> # Problematic frame:
> # J  
> java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V
> #
> # An error report file with more information is saved as 
> hs_err_pid20786.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> Aborted
> iteration 1
> iteration 100001
> iteration 200001
> iteration 300001
> iteration 700001
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x439437dd, pid=22123, tid=16384
> #
> # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed 
> mode, sharing)
> # Problematic frame:
> # J  
> java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace;ZZII)V
> #
> # An error report file with more information is saved as 
> hs_err_pid22123.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> Aborted
> iteration 1
> iteration 100001
> iteration 200001
> iteration 1100001
> iteration 1200001
> Exception in thread "main" 
> java.lang.IllegalArgumentException: Illegal 
> Load: NaN
>          at java.util.Hashtable.<init>(Hashtable.java:160)
>          at java.util.Hashtable.<init>(Hashtable.java:186)
>          at 
> sun.awt.image.CachingSurfaceManager.<init>(CachingSurfaceManag
> er.java:163)
>          at 
> sun.awt.motif.X11CachingSurfaceManager.<init>(X11CachingSurfac
> eManager.java:57)
>          at 
> sun.java2d.SurfaceManagerFactory.createCachingManager(SurfaceM
> anagerFactory.java:38)
>          at 
> sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:69)
>          at 
> sun.awt.image.SurfaceManager.getManager(SurfaceManager.java:45)
>          at 
> sun.java2d.SurfaceData.getDestSurfaceData(SurfaceData.java:113)
>          at 
> sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEn
> vironment.java:337)
>          at 
> sun.java2d.HeadlessGraphicsEnvironment.createGraphics(Headless
> GraphicsEnvironment.java:77)
>          at 
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1143)
>          at FillTest.test(FillTest.java:20)
>          at FillTest.main(FillTest.java:11)
> iteration 1
> iteration 100001
> 
> 
> 
> 
> 
> iteration 400001
> iteration 500001
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x43adbbdd, pid=26268, tid=16384
> #
> # Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
> # Problematic frame:
> # j  java.awt.image.SinglePixelPackedSampleModel.<init>(IIII[I)V+62
> #
> # An error report file with more information is saved as 
> hs_err_pid26268.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> 
> 
> iteration 500001
> Exception in thread "main" java.lang.IllegalArgumentException: 
> Dimensions (width=1 height=7) are too large
>          at java.awt.image.SampleModel.<init>(SampleModel.java:112)
>          at 
> java.awt.image.SinglePixelPackedSampleModel.<init>(SinglePixel
> PackedSampleModel.java:124)
>          at java.awt.image.Raster.createPackedRaster(Raster.java:770)
>          at java.awt.image.Raster.createPackedRaster(Raster.java:466)
>          at 
> java.awt.image.DirectColorModel.createCompatibleWritableRaster
> (DirectColorModel.java:1015)
>          at 
> java.awt.image.BufferedImage.<init>(BufferedImage.java:314)
>          at FillTest.test(FillTest.java:19)
>          at FillTest.main(FillTest.java:11)
> iteration 1
> iteration 100001
> 
> iteration 400001
> iteration 500001
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x43adbbdd, pid=24844, tid=16384
> #
> # Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
> # Problematic frame:
> # j 
> java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace
> ;ZZII)V+221
> #
> # An error report file with more information is saved as 
> hs_err_pid24844.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> Aborted
> 
> 
> iteration 1100001
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  SIGSEGV (0xb) at pc=0x43adbbdd, pid=24479, tid=16384
> #
> # Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode)
> # Problematic frame:
> # j 
> java.awt.image.ColorModel.<init>(I[ILjava/awt/color/ColorSpace
> ;ZZII)V+221
> #
> # An error report file with more information is saved as 
> hs_err_pid24479.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> Aborted
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Java Problems
  2005-08-12  8:16 Ian Pratt
@ 2005-08-12  9:35 ` Peter
  0 siblings, 0 replies; 9+ messages in thread
From: Peter @ 2005-08-12  9:35 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel, xen

This is on a xenU kernel we compiled (based on your default .config with 
a few extra options enabled).  I could dig out the .config if you need it.

I have not tried this on 2.0.7.  I will if you think it will make a 
difference.

Since I posted my original email (but possibly before you read it) I 
updated the http://downloads.rimuhosting.com/FillTest.java test case.

It is pretty simple now and after a few dozen million iterations appears 
to clearly show the value of an argument changing on the stack.

It seems easier to reproduce the exception when the host server is 
busier (i.e. when I run it on a server that is 'fully' allocated I get 
the exception thrown pretty much each run, on a lightly loaded server 
sometimes I need a dozen or so runs to reproduce the problem.

Regards, Peter
http://rimuhosting.com - Xen VPS Hosting

Ian Pratt wrote:
> Do you use our -xen0 / -xenU kernels or compile your own?
> Can you reproduce this on 2.0.7 or unstable ?
> 
> Thanks,
> Ian
> 
> 
>>Hi.  This post follows on from:
>>http://lists.xensource.com/archives/html/xen-devel/2005-04/msg
>>00185.html
>>
>>And is possibly related to the bug referenced here:
>>http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4335360
>>
>>In summary: Java processes are doing odd things.
>>
>>1) It appears that number values are mysteriously changing.  
>>e.g. if you 
>>look at the Hashtable error there is no way the 
>>IllegalArgumentException 
>>could be thrown, unless the float value passed into a 
>>function is being 
>>corrupted somehow on the stack.
>>
>>2) I'm seeing JVM crashes (e.g. the ColorModel crash below).  
>>I'm seeing 
>>other crashes inside native code methods in other apps I'm running.
>>
>>I've tried this with/without /lib/tls.  And on a RHEL4 and 
>>Debian Sarge 
>>DomU.
>>
>>I don't see either problem when the same app runs on a non-Xen server.
>>
>>Guesswork: I notice that SSE comes up in related to other reports of 
>>this bug (http://www.tommesani.com/SSE.html, 
>>http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4948500). 
>>Perhaps there is some kind of register corruption going on?  Or 
>>something that could corrupt float arguments on the stack?  And if 
>>that's the case then this could be something with wider implications 
>>than just Java processes.
>>
>>Does anyone have any ideas what it might be?  If you're interested in 
>>tracking it down, the following test case may help.
>>
>>Regards, Peter
>>http://rimuhosting.com - Xen VPS Hosting
>>
>>
>># prerequisite you'll need to install a 1.5 JDK from sun
>># host is Xen 2.0.6
>># uname -r
>>2.6.11.10-xenU-rimu1
>>#  wget http://downloads.rimuhosting.com/FillTest.java
>>#  javac -target 1.4 -source 1.4 FillTest.java; while true; do java 
>>-client -Djava.awt.headless=true FillTest; ret=$?; if [ $? 
>>-ne 0 ]; then 
>>echo ret=$ret; break; fi; done

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Java Problems
@ 2005-08-12 10:12 Ian Pratt
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Pratt @ 2005-08-12 10:12 UTC (permalink / raw)
  To: Peter; +Cc: xen-devel, xen

> This is on a xenU kernel we compiled (based on your default 
> .config with a few extra options enabled).  I could dig out 
> the .config if you need it.
> 
> I have not tried this on 2.0.7.  I will if you think it will 
> make a difference.

It's definitely worth trying. 

Ian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Java Problems
@ 2005-08-12 13:31 David_Wolinsky
  0 siblings, 0 replies; 9+ messages in thread
From: David_Wolinsky @ 2005-08-12 13:31 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 173 bytes --]

I have been using all of the BEA jrockit JVMs without a problem in Xen.
Unless a problem has cropped up in the past week and a half, it should
still work great.

David

[-- Attachment #1.2: Type: text/html, Size: 596 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Java Problems
       [not found] <OF8DAF4393.0622A224-ON8525705B.004B18C0-8525705B.004B6D78@us.ibm.com>
@ 2005-08-12 20:17 ` Peter
  2005-08-12 21:29   ` Peter
  0 siblings, 1 reply; 9+ messages in thread
From: Peter @ 2005-08-12 20:17 UTC (permalink / raw)
  To: Reuben Kabel; +Cc: xen-devel

Hi.

I don't have a 2.0.7 to test on at the moment.  I will try again when I do.

I got rid of the object allocation inside the loop.  And I retested.  I 
don't hit the problem with int's on the call stack.  I do hit the 
problem with floats and doubles.

The problem is quite easily reproducible (for me).  Is someone there 
with knowledge of register/stack handle able to take a look with gdb or 
which ever tool you use?

Regards, Peter
http://rimuhosting.com - Xen VPS Hosting


public class FillTest {
     public static void main(String[] args) {
         System.out.println("Starting");
         foo f = new foo();
         for (int i = 0;i<100000000; i++) {
             f.iter = i;
             f.test();
         }
     }
     public static class foo {
         int iter;
         float f = 0.75f;
         int i=1;
         double d = 0.75d;
         void test() {
             testI(i);
             testD(d);
             test(f);
         }
         void test(float f1) {
             if(f1!=f) {
                 throw new RuntimeException("float value mismatch: " + 
f1 + " vs " + f + " at iteration " + iter);
             }
         }
         void testI(int fi) {
             if(fi!=i) {
                 throw new RuntimeException("int value mismatch: " + fi 
+ " vs " + i + " at iteration " + iter);
             }
         }
         void testD(double fd) {
             if(fd!=d) {
                 throw new RuntimeException("double value mismatch: " + 
fd + " vs " + d + " at iteration " + iter);
             }
         }
     }
}


Starting
Exception in thread "main" java.lang.RuntimeException: double value 
mismatch: 0.                                      75 vs 0.75 at 
iteration 3981054
         at FillTest$foo.testD(FillTest.java:33)
         at FillTest$foo.test(FillTest.java:18)
         at FillTest.main(FillTest.java:8)
Starting
Starting
Exception in thread "main" java.lang.RuntimeException: double value 
mismatch: Na                                      N vs 0.75 at iteration 
33238270
         at FillTest$foo.testD(FillTest.java:33)
         at FillTest$foo.test(FillTest.java:18)
         at FillTest.main(FillTest.java:8)
Starting
Exception in thread "main" java.lang.RuntimeException: double value 
mismatch: 0.75                                     vs 0.75 at iteration 
43731162
         at FillTest$foo.testD(FillTest.java:33)
         at FillTest$foo.test(FillTest.java:18)
         at FillTest.main(FillTest.java:8)
Starting
Exception in thread "main" java.lang.RuntimeException: double value 
mismatch: 0.75 vs 0.75 at iteration 26104068
         at FillTest$foo.testD(FillTest.java:33)
         at FillTest$foo.test(FillTest.java:18)
         at FillTest.main(FillTest.java:8)
Starting
Exception in thread "main" java.lang.RuntimeException: double value 
mismatch: 0.75 vs 0.75 at iteration 350370
         at FillTest$foo.testD(FillTest.java:33)
         at FillTest$foo.test(FillTest.java:18)
         at FillTest.main(FillTest.java:8)
Starting


Reuben Kabel wrote:
> 
> 
> 
> Does the following code exhibit the same problem? I've modified it so it
> doesn't try to allocate many foo instances within the loop.
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Java Problems
  2005-08-12 20:17 ` Java Problems Peter
@ 2005-08-12 21:29   ` Peter
  2005-08-13 11:57     ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Peter @ 2005-08-12 21:29 UTC (permalink / raw)
  Cc: xen-devel, Reuben Kabel

Oh.  And to just simplify this test case a little more I bypass Java 
altogether and use this little C gem.  It also triggers the problem.

#include <stdio.h>
float s_i = 0.75;
void test(float i) {
         if(i!=s_i) {
                 printf("error\n");
         }
}
int main(char **args) {
         printf("Starting\n");
         long i=0;
         for (i = 0;i<100000000; i++) {
             test(s_i);
         }
         return 0;
     }

Starting
errorStarting
Starting
Starting
Starting
errorerrorerrorerrorStarting
errorStarting
errorStarting
Starting
Starting
Starting
errorerrorerrorStarting


Peter wrote:
> Hi.
> 
> I don't have a 2.0.7 to test on at the moment.  I will try again when I do.
> 
> I got rid of the object allocation inside the loop.  And I retested.  I 
> don't hit the problem with int's on the call stack.  I do hit the 
> problem with floats and doubles.
> 
> The problem is quite easily reproducible (for me).  Is someone there 
> with knowledge of register/stack handle able to take a look with gdb or 
> which ever tool you use?
> 
> Regards, Peter
> http://rimuhosting.com - Xen VPS Hosting
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Java Problems
  2005-08-12 21:29   ` Peter
@ 2005-08-13 11:57     ` Keir Fraser
  2005-08-14  0:29       ` Peter
  0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2005-08-13 11:57 UTC (permalink / raw)
  To: Peter; +Cc: xen-devel, Reuben Kabel


On 12 Aug 2005, at 22:29, Peter wrote:

> Oh.  And to just simplify this test case a little more I bypass Java 
> altogether and use this little C gem.  It also triggers the problem.

This sounds like a bug that was fixed for 2.0.7. Let us know if you can 
repro on 2.0.7.

  -- Keir

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Java Problems
  2005-08-13 11:57     ` Keir Fraser
@ 2005-08-14  0:29       ` Peter
  0 siblings, 0 replies; 9+ messages in thread
From: Peter @ 2005-08-14  0:29 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Reuben Kabel

I cannot reproduce the problem on a 2.0.7 test box.  Though it does not 
have the same kind of load or dual CPU as the (production) server on 
which I initially produced.

Consider this resolved.  If I can reproduce on the production box 
running 2.0.7 I'll repost here.

Thanks for the assistance.

Regards, Peter
http://rimuhosting.com - Xen VPS Hosting

Keir Fraser wrote:
> 
> On 12 Aug 2005, at 22:29, Peter wrote:
> 
>> Oh.  And to just simplify this test case a little more I bypass Java 
>> altogether and use this little C gem.  It also triggers the problem.
> 
> 
> This sounds like a bug that was fixed for 2.0.7. Let us know if you can 
> repro on 2.0.7.
> 
>  -- Keir

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-08-14  0:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OF8DAF4393.0622A224-ON8525705B.004B18C0-8525705B.004B6D78@us.ibm.com>
2005-08-12 20:17 ` Java Problems Peter
2005-08-12 21:29   ` Peter
2005-08-13 11:57     ` Keir Fraser
2005-08-14  0:29       ` Peter
2005-08-12 13:31 David_Wolinsky
  -- strict thread matches above, loose matches on Subject: below --
2005-08-12 10:12 Ian Pratt
2005-08-12  8:16 Ian Pratt
2005-08-12  9:35 ` Peter
2005-08-12  3:03 Peter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.