Issue Details (XML | Word | Printable)

Key: RVM-617
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Aleksey Shipilev
Reporter: Ian Rogers
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
RVM

DaCapo bloat fails with Apache Harmony class library

Created: 08/Aug/08 06:02 AM   Updated: 14/Sep/08 05:18 AM   Resolved: 14/Sep/08 05:18 AM
Component/s: Runtime: Class Library: Harmony
Affects Version/s: None
Fix Version/s: 3.0.1

Time Tracking:
Not Specified

File Attachments: 1. Text File rvm-harmony-bootclasspath-v1.patch (1 kB)

Environment: Jikes RVM r14855 Harmony r681495


 Description  « Hide

Running DaCapo bloat fails with:

===== DaCapo bloat starting =====
java.lang.RuntimeException: Class not found: java/lang/Object
java.lang.RuntimeException: Class not found: java/lang/Object
at .<invisible method>(Unknown Source)
at java.lang.Throwable.fillInStackTrace(Throwable.java:131)
at java.lang.Throwable.<init>(Throwable.java:77)
at java.lang.Throwable.<init>(Throwable.java:87)
at java.lang.Exception.<init>(Exception.java:48)
at java.lang.RuntimeException.<init>(RuntimeException.java:44)
at EDU.purdue.cs.bloat.editor.ClassHierarchy.addClass(ClassHierarchy.java:386)
at EDU.purdue.cs.bloat.editor.ClassHierarchy.addClassNamed(ClassHierarchy.java:116)
at EDU.purdue.cs.bloat.editor.ClassHierarchy.getExtendsNode(ClassHierarchy.java:308)
at EDU.purdue.cs.bloat.editor.ClassHierarchy.addClass(ClassHierarchy.java:401)
at EDU.purdue.cs.bloat.editor.ClassHierarchy.addClassNamed(ClassHierarchy.java:116)
at EDU.purdue.cs.bloat.context.PersistentBloatContext.addClasses(PersistentBloatContext.java:116)
at EDU.purdue.cs.bloat.context.CachingBloatContext.<init>(CachingBloatContext.java:70)
at EDU.purdue.cs.bloat.optimize.Main.main(Main.java:413)
at dacapo.bloat.BloatHarness.iterate(BloatHarness.java:25)
at dacapo.Benchmark.run(Benchmark.java:121)
at dacapo.TestHarness.runBenchmark(TestHarness.java:295)
at dacapo.TestHarness.main(TestHarness.java:235)
at Harness.main(Harness.java:5)

I believe this issue relates to the partial class loader implementation in the current Apache Harmony classes in libraryInterface.



Aleksey Shipilev added a comment - 08/Aug/08 12:59 PM

Reproduced on Jikes RVM r14855, Harmony r681495, Gentoo Linux x86.


Ian Rogers added a comment - 16/Aug/08 06:22 PM

Probably related:

http://jikesrvm.anu.edu.au/cattrack/results/cayenne.anu.edu.au/sanity-harmony/4824/FullAdaptiveMarkSweep/default/soot/soot.Main/default/Output.txt

Soot started on Sat Aug 16 12:51:06 GMT-05:00 2008
java.lang.RuntimeException: couldn't find class: java.io.Serializable (is your soot-class-path set properly?)
at .<invisible method>(Unknown Source)
at java.lang.Throwable.fillInStackTrace(Throwable.java:131)
at java.lang.Throwable.<init>(Throwable.java:77)
at java.lang.Throwable.<init>(Throwable.java:89)
at java.lang.Exception.<init>(Exception.java:48)
at java.lang.RuntimeException.<init>(RuntimeException.java:44)
at soot.SootResolver.bringToHierarchy(SootResolver.java:139)
at soot.SootResolver.bringToSignatures(SootResolver.java:172)
at soot.SootResolver.processResolveWorklist(SootResolver.java:104)
at soot.SootResolver.resolveClass(SootResolver.java:89)
at soot.Scene.tryLoadClass(Scene.java:298)
at soot.Scene.loadBasicClasses(Scene.java:848)
at soot.Scene.loadNecessaryClasses(Scene.java:874)
at soot.Main.run(Main.java:170)
at soot.Main.main(Main.java:146)


Aleksey Shipilev added a comment - 13/Sep/08 06:14 PM

bloat really tries to load java.lang.Object from classpath, but classpath differ:

Sun's JDK 1.6: Loading class 'java/lang/Object' from
/home/shade/trunks/bloat/bin:
/opt/sun-jdk-1.6.0.07/jre/lib/resources.jar:
/opt/sun-jdk-1.6.0.07/jre/lib/rt.jar:
/opt/sun-jdk-1.6.0.07/jre/lib/sunrsasign.jar:
/opt/sun-jdk-1.6.0.07/jre/lib/jsse.jar:
/opt/sun-jdk-1.6.0.07/jre/lib/jce.jar:
/opt/sun-jdk-1.6.0.07/jre/lib/charsets.jar:
/opt/sun-jdk-1.6.0.07/jre/classes:null

RVM+Harmony: Loading class 'java/lang/Object' from
/home/shade/trunks/bloat/bin:null:null

Hence I suspect bloat looks up for bootclasspath via System.getProperty("sun.boot.class.path") which is not set.


Aleksey Shipilev added a comment - 13/Sep/08 06:17 PM

rvm-harmony-bootclasspath-v1.patch
Sets the missed system property.

Fixes Dacapo:bloat failure on JikesRVM r14973, Harmony classlib r694933 + build fix, Gentoo x86.
I'll bet it would fix another related issues too (like Soot one).


Aleksey Shipilev added a comment - 13/Sep/08 06:17 PM

STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR

I, Aleksey Shipilev:

(a) represent that either:

I am the only author and owner of the contributed software
(described as/entitled "RVM-617 Bootclasspath handling in JikesRVM"),
which was neither derived nor copied from any other software,
or

(ii) that any exception to is software which was obtained under the
CPL (Common Public License),

and

(b) hereby agree to license this contributed software under the CPL.


Ian Rogers added a comment - 14/Sep/08 05:18 AM

Patch committed in r14980.