Hi Minas, I tried recompiling Classpath with -fno-omit-frame-pointer, and now, instead of printing an error message, j3 just segfaults in "j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) ()" I ran llcj under strace and found that it is not even opening the input or output files, but is otherwise running normally. Updating to the latest SVN version (revision 108831) didn't change anything (I was only a few days out of date). I'm not sure where to go from here. Does this fit with any of the known problems under 64-bit linux? Thanks, Joshua On Mon, Jul 19, 2010 at 4:45 PM, Minas Abrahamyan <minas.subs at gmail.com>wrote:> Hi Joshua, > > $ j3 Hello > > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): > > Assertion `(this->isInitializing() || > > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized class > > when allocating."' failed. > > Aborted > > Regarding to j3 in 64 bit version, it should work now after we've > found crush reason, > both in Debug and in Release versions. (and its 32 bit version was > continuously working) > > But your case is something strange, crush didn't type such messages. > Have you taken VMkit from svn and latest version? > Also, to get j3 running recompile classpath with > -fno-omit-frame-pointer (or take my patch from here: > > http://lists.cs.uiuc.edu/pipermail/vmkit-commits/attachments/20100719/35754a6f/attachment.bin > and apply it: > $ cd classpath-0.97.2 > $ patch ./configure ./classpath_configure64.patch > ) > > That's now on j3 > > Regards, > Minas > > On Mon, Jul 19, 2010 at 9:20 PM, Joshua Warner <joshuawarner32 at gmail.com> > wrote: > > Forgot to send to the mailing list... > > > > ---------- Forwarded message ---------- > > From: Joshua Warner <joshuawarner32 at gmail.com> > > Date: Mon, Jul 19, 2010 at 10:19 AM > > Subject: Re: [LLVMdev] Building VMKit > > To: nicolas geoffray <nicolas.geoffray at gmail.com> > > > > > > Thanks Nicolas, that worked great! > > > > Now, I'm having trouble invoking the compiler properly: > > $ llcj Hello.class -o=Hello.ll > > $ cat Hello.ll > > cat: Hello.ll: No such file or directory > > $ j3 Hello > > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): > > Assertion `(this->isInitializing() || > > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized class > > when allocating."' failed. > > Aborted > > $ java Hello > > hello, world! > > > > "Hello" is a completely banal "hello world!" program. > > > > Joshua > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/ffcd3705/attachment.html>
Hi Joshua, If you can get a running 32bit system, I'd suggest you do so, as you'll get up to speed right away. I can't test VMKit on a 64bits machine, and I have been aware that there are some compilation/execution problems. Besides, the current GCs of VMKit do not work on 64bits (neither MMTk nor GCMmap2). Nicolas On Tue, Jul 20, 2010 at 3:56 PM, Joshua Warner <joshuawarner32 at gmail.com>wrote:> Hi Minas, > > I tried recompiling Classpath with -fno-omit-frame-pointer, and now, > instead of printing an error message, j3 just segfaults in > "j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) ()" > > I ran llcj under strace and found that it is not even opening the input or > output files, but is otherwise running normally. > > Updating to the latest SVN version (revision 108831) didn't change anything > (I was only a few days out of date). > > I'm not sure where to go from here. Does this fit with any of the known > problems under 64-bit linux? > > Thanks, > Joshua > > > On Mon, Jul 19, 2010 at 4:45 PM, Minas Abrahamyan <minas.subs at gmail.com>wrote: > >> Hi Joshua, >> > $ j3 Hello >> > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): >> > Assertion `(this->isInitializing() || >> > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized class >> > when allocating."' failed. >> > Aborted >> >> Regarding to j3 in 64 bit version, it should work now after we've >> found crush reason, >> both in Debug and in Release versions. (and its 32 bit version was >> continuously working) >> >> But your case is something strange, crush didn't type such messages. >> Have you taken VMkit from svn and latest version? >> Also, to get j3 running recompile classpath with >> -fno-omit-frame-pointer (or take my patch from here: >> >> http://lists.cs.uiuc.edu/pipermail/vmkit-commits/attachments/20100719/35754a6f/attachment.bin >> and apply it: >> $ cd classpath-0.97.2 >> $ patch ./configure ./classpath_configure64.patch >> ) >> >> That's now on j3 >> >> Regards, >> Minas >> >> On Mon, Jul 19, 2010 at 9:20 PM, Joshua Warner <joshuawarner32 at gmail.com> >> wrote: >> > Forgot to send to the mailing list... >> > >> > ---------- Forwarded message ---------- >> > From: Joshua Warner <joshuawarner32 at gmail.com> >> > Date: Mon, Jul 19, 2010 at 10:19 AM >> > Subject: Re: [LLVMdev] Building VMKit >> > To: nicolas geoffray <nicolas.geoffray at gmail.com> >> > >> > >> > Thanks Nicolas, that worked great! >> > >> > Now, I'm having trouble invoking the compiler properly: >> > $ llcj Hello.class -o=Hello.ll >> > $ cat Hello.ll >> > cat: Hello.ll: No such file or directory >> > $ j3 Hello >> > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): >> > Assertion `(this->isInitializing() || >> > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized class >> > when allocating."' failed. >> > Aborted >> > $ java Hello >> > hello, world! >> > >> > "Hello" is a completely banal "hello world!" program. >> > >> > Joshua >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/d7d455b7/attachment.html>
Hi Nicolas, Thanks for all your help, but if 64-bit systems are still a big problem, perhaps the VMKit AOT compiler is not the best solution to my problem. I'd like to be able to support the major (if not all all) platforms that the Avian JVM supports - x86 & x86_64 linux & windows, powerpc darwin and ARM. Regards, Joshua On Tue, Jul 20, 2010 at 8:00 AM, nicolas geoffray < nicolas.geoffray at gmail.com> wrote:> Hi Joshua, > > If you can get a running 32bit system, I'd suggest you do so, as you'll get > up to speed right away. I can't test VMKit on a 64bits machine, and I have > been aware that there are some compilation/execution problems. Besides, the > current GCs of VMKit do not work on 64bits (neither MMTk nor GCMmap2). > > Nicolas > > > On Tue, Jul 20, 2010 at 3:56 PM, Joshua Warner <joshuawarner32 at gmail.com>wrote: > >> Hi Minas, >> >> I tried recompiling Classpath with -fno-omit-frame-pointer, and now, >> instead of printing an error message, j3 just segfaults in >> "j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) ()" >> >> I ran llcj under strace and found that it is not even opening the input or >> output files, but is otherwise running normally. >> >> Updating to the latest SVN version (revision 108831) didn't change >> anything (I was only a few days out of date). >> >> I'm not sure where to go from here. Does this fit with any of the known >> problems under 64-bit linux? >> >> Thanks, >> Joshua >> >> >> On Mon, Jul 19, 2010 at 4:45 PM, Minas Abrahamyan <minas.subs at gmail.com>wrote: >> >>> Hi Joshua, >>> > $ j3 Hello >>> > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): >>> > Assertion `(this->isInitializing() || >>> > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized >>> class >>> > when allocating."' failed. >>> > Aborted >>> >>> Regarding to j3 in 64 bit version, it should work now after we've >>> found crush reason, >>> both in Debug and in Release versions. (and its 32 bit version was >>> continuously working) >>> >>> But your case is something strange, crush didn't type such messages. >>> Have you taken VMkit from svn and latest version? >>> Also, to get j3 running recompile classpath with >>> -fno-omit-frame-pointer (or take my patch from here: >>> >>> http://lists.cs.uiuc.edu/pipermail/vmkit-commits/attachments/20100719/35754a6f/attachment.bin >>> and apply it: >>> $ cd classpath-0.97.2 >>> $ patch ./configure ./classpath_configure64.patch >>> ) >>> >>> That's now on j3 >>> >>> Regards, >>> Minas >>> >>> On Mon, Jul 19, 2010 at 9:20 PM, Joshua Warner <joshuawarner32 at gmail.com> >>> wrote: >>> > Forgot to send to the mailing list... >>> > >>> > ---------- Forwarded message ---------- >>> > From: Joshua Warner <joshuawarner32 at gmail.com> >>> > Date: Mon, Jul 19, 2010 at 10:19 AM >>> > Subject: Re: [LLVMdev] Building VMKit >>> > To: nicolas geoffray <nicolas.geoffray at gmail.com> >>> > >>> > >>> > Thanks Nicolas, that worked great! >>> > >>> > Now, I'm having trouble invoking the compiler properly: >>> > $ llcj Hello.class -o=Hello.ll >>> > $ cat Hello.ll >>> > cat: Hello.ll: No such file or directory >>> > $ j3 Hello >>> > j3: JavaClass.cpp:480: j3::JavaObject* j3::Class::doNew(j3::Jnjvm*): >>> > Assertion `(this->isInitializing() || >>> > classLoader->getCompiler()->isStaticCompiling()) && "Uninitialized >>> class >>> > when allocating."' failed. >>> > Aborted >>> > $ java Hello >>> > hello, world! >>> > >>> > "Hello" is a completely banal "hello world!" program. >>> > >>> > Joshua >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/b0ba2939/attachment.html>
On Tue, Jul 20, 2010 at 6:56 PM, Joshua Warner <joshuawarner32 at gmail.com> wrote:> Hi Minas, > > I tried recompiling Classpath with -fno-omit-frame-pointer, and now, instead > of printing an error message, j3 just segfaults in > "j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) ()" >Could you please run it under gdb like $ gdb --args ./j3 HelloWorld and print here backtrace at fall?> I ran llcj under strace and found that it is not even opening the input or > output files, but is otherwise running normally.Let's make things clear (to me): Have you pass these steps: http://vmkit.llvm.org/use_aot.html - Java Ahead of Time (AOT) Compilation ? If yes, how is it finished process of making glibj.zip into native code? I didn't pass it on my 64-bit machine. Interesting if you get there> Updating to the latest SVN version (revision 108831) didn't change anything > (I was only a few days out of date). > > I'm not sure where to go from here. Does this fit with any of the known > problems under 64-bit linux?Not know yet :)> > Thanks, > JoshuaThanks, Minas
On Tue, Jul 20, 2010 at 12:28 PM, Minas Abrahamyan <minas.subs at gmail.com>wrote:> On Tue, Jul 20, 2010 at 6:56 PM, Joshua Warner <joshuawarner32 at gmail.com> > wrote: > > Hi Minas, > > > > I tried recompiling Classpath with -fno-omit-frame-pointer, and now, > instead > > of printing an error message, j3 just segfaults in > > "j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) ()" > > > > Could you please run it under gdb like > $ gdb --args ./j3 HelloWorld > and print here backtrace at fall? > >Below is the output of the gdb session: $ gdb --args ./j3 HelloWorld GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/jowarner/code/vmkit/Release+Asserts/bin/j3...(no debugging symbols found)...done. (gdb) r Starting program: /home/jowarner/code/vmkit/Release+Asserts/bin/j3 HelloWorld [Thread debugging using libthread_db enabled] [New Thread 0x1200ff700 (LWP 16322)] [New Thread 0x1201ff700 (LWP 16323)] [New Thread 0x1202ff700 (LWP 16324)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x1200ff700 (LWP 16322)] 0x000000000052d725 in j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) () (gdb) bt #0 0x000000000052d725 in j3::JnjvmClassLoader::loadClassFromAsciiz(char const*, bool, bool) () #1 0x0000000000558633 in FindClass(_Jv_JNIEnv*, char const*) () #2 0x00007ffff60d531d in JNI_OnLoad () from /usr/lib/classpath/libjavanio.so #3 0x000000000055d558 in callOnLoad () #4 0x0000000000569630 in Java_java_lang_VMRuntime_nativeLoad () #5 0x00007ffff7f07491 in ?? () #6 0x0000000000000000 in ?? () (gdb) list 1 events.c: No such file or directory. in events.c (gdb) f 1 #1 0x0000000000558633 in FindClass(_Jv_JNIEnv*, char const*) () (gdb) list 1 in events.c (gdb)> > I ran llcj under strace and found that it is not even opening the input > or > > output files, but is otherwise running normally. > Let's make things clear (to me): > Have you pass these steps: > http://vmkit.llvm.org/use_aot.html - Java Ahead of Time (AOT) Compilation > ? >I followed those instructions - no different result.> > If yes, how is it finished process of making glibj.zip into native code? > I didn't pass it on my 64-bit machine. Interesting if you get there >I'm not sure what you mean. There were no errors in the build, and both llcj and vmcj seem otherwise functional (they both run and print usage information just fine).> > > Updating to the latest SVN version (revision 108831) didn't change > anything > > (I was only a few days out of date). > > > > I'm not sure where to go from here. Does this fit with any of the known > > problems under 64-bit linux? > > Not know yet :) > > > > > Thanks, > > Joshua > > Thanks, > Minas > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/44db9a9f/attachment.html>