[
http://jira.codehaus.org/browse/RVM-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=189062#action_189062 ]
Andreas Sewe commented on RVM-851:
----------------------------------
First of all, here's what SVN has to say about the modified RVM I am using:
{quote}
sewe@rossini:~/pretenuring/jikesrvm-3.1.0$ svn info
Path: .
URL:
https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvm/rvmroot/tags/3.1.0Repository Root:
https://jikesrvm.svn.sourceforge.net/svnroot/jikesrvmRepository UUID: dce3f540-011b-0410-8642-b5df2b1aa704
Revision: 15768
Node Kind: directory
Schedule: normal
Last Changed Author: dgrove-oss
Last Changed Rev: 15707
Last Changed Date: 2009-06-10 16:20:23 +0200 (Wed, 10 Jun 2009)
sewe@rossini:~/pretenuring/jikesrvm-3.1.0$ svn status
M rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java
sewe@rossini:~/pretenuring/jikesrvm-3.1.0$ svn diff
Index: rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java
===================================================================
--- rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java (revision 15768)
+++ rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java (working copy)
@@ -3240,14 +3240,14 @@
int whichAllocator = MemoryManager.pickAllocator(typeRef, method);
int align = ObjectModel.getAlignment(typeRef, false);
int offset = ObjectModel.getOffsetForAlignment(typeRef, false);
- int site = MemoryManager.getAllocationSite(true);
+ // MemoryManager.getAllocationSite(true);
asm.emitPUSH_Imm(instanceSize);
asm.emitPUSH_Abs(Magic.getTocPointer().plus(tibOffset)); // put tib on stack
asm.emitPUSH_Imm(typeRef.hasFinalizer() ? 1 : 0); // does the class have a finalizer?
asm.emitPUSH_Imm(whichAllocator);
asm.emitPUSH_Imm(align);
asm.emitPUSH_Imm(offset);
- asm.emitPUSH_Imm(site);
+ asm.emitPUSH_Imm(42);
genParameterRegisterLoad(asm, 7); // pass 7 parameter words
asm.emitCALL_Abs(Magic.getTocPointer().plus(Entrypoints.resolvedNewScalarMethod.getOffset()));
asm.emitPUSH_Reg(T0);
{quote}
So, you see, it was indeed this little change that provoked the bug, as on "ia32-linux" both {{ant -f test.xml -Dtest-run.name=tiny -Dtest.configs=prototype}} and {{ant -f test.xml -Dtest-run.name=tiny -Dtest.configs=prototype-opt}} run just fine -- unless I make the above change.
In that case, the first test of tiny reproducibly causes an {{OVERTIME}} error, leaving the following result:
{quote}
GCWarning: Live ratio greater than 1: 7.77
GCWarning: Live ratio greater than 1: 1.02
GCWarning: Live ratio greater than 1: 1.02
Exception in thread "Jikes_RBoot_Thread": java.lang.OutOfMemoryError
at java.lang.String.toCharArray(String.java:1742)
at java.lang.String.replace(String.java:1307)
at org.jikesrvm.VM.runClassInitializer(VM.java:527)
at org.jikesrvm.VM.finishBooting(VM.java:403)
at org.jikesrvm.VM.boot(VM.java:145)
{quote}
To summarize, the RVM doesn't terminate after this, but idles for a long while at 0% CPU until it is shut down by the test harness.
At any rate, here's some more information that may be helpful to you:
{quote}
sewe@rossini:~/pretenuring/jikesrvm-3.1.0$ uname -a
Linux rossini 2.6.20-16-386 #2 Tue Feb 12 05:38:06 UTC 2008 i686 GNU/Linux
sewe@rossini:~/pretenuring/jikesrvm-3.1.0$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) D CPU 3.00GHz
stepping : 2
cpu MHz : 2992.790
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx cid cx16 xtpr lahf_lm
bogomips : 5990.08
clflush size : 64
{quote}
I hope this helps. But believe me, I am just as baffled by this behavior as you. ;-)
> MemoryManager.getAllocationSite: Bug waiting to happen
> ------------------------------------------------------
>
> Key: RVM-851
> URL:
http://jira.codehaus.org/browse/RVM-851> Project: RVM
> Issue Type: Bug
> Affects Versions: 3.1.0
> Environment: Jikes RVM 3.0.1 (r15707), ia32-linux, prototype-opt
> Reporter: Andreas Sewe
> Assignee: Steve Blackburn
> Priority: Minor
> Attachments: BaselineCompilerImpl.java.patch
>
>
> This is not yet a bug, but it certainly looks like a bug waiting to happen: If one removes the call to {{MemoryManager.getAllocationSite(true)}} in {{BaselineCompilerImpl}} (as the site ID is currently not used anyway) and instead passes a constant to the corresponding entrypoint method (we tested this with {{resolvedNewScalar}}), the RVM hangs upon the first allocation while still in {{finishBooting}}, throwing an {{OutOfMemoryException}}.
> Exception in thread "Jikes_RBoot_Thread": java.lang.OutOfMemoryError
> at java.lang.String.toCharArray(String.java:1742)
> at java.lang.String.replace(String.java:1307)
> at org.jikesrvm.VM.runClassInitializer(VM.java:527)
> at org.jikesrvm.VM.finishBooting(VM.java:403)
> at org.jikesrvm.VM.boot(VM.java:145)
> The attached patch is a two line change that makes this bug occur.
> My guess is that this method call, which the patch removes, implicitly encodes a dependency on {{Plan}} (the class which ultimately does the work for {{getAllocationSite}}). If this is the case, it should rather be made explicit, as it sooner or later will bite you -- just as it bit us. :-(
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
Jikesrvm-issues mailing list
Jikesrvm-issues@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-issues