I got the following errors while runnig kernel and other vm tests on Suse/x86:
   [junit] Running org.apache.harmony.lang.generics.ClassLoaderTest
   [junit] SIGSEGV in VM code.
   [junit] Stack trace:
   [junit]     1: strlen (??:-1)
   [junit]     2: GetSystemProperty
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmi/src/vmi.cpp:150)
   [junit]     3: readClassPathFromPropertiesFile (../shared/luniglob.c:275)
   [junit]     4: JNI_OnLoad (../shared/luniglob.c:126)
   [junit]     5: find_call_JNI_OnLoad
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/util/natives_support.cpp:119)
   [junit]     6: natives_load_library(char const*, bool*, int*)
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/util/natives_support.cpp:287)
   [junit]     7: ClassLoader::LoadNativeLibrary(char const*)
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/class_support/classloader.cpp:1046)
   [junit]     8: BootstrapClassLoader::Initialize(ManagedObject*)
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/class_support/classloader.cpp:1369)
   [junit]     9: bootstrap_initial_java_classes
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/init/vm_init.cpp:292)
   [junit]     10: preload_classes
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/init/vm_init.cpp:334)
   [junit]     11: vm_init1(JavaVM_Internal*, JavaVMInitArgs*)
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/init/vm_init.cpp:691)
   [junit]     12: JNI_CreateJavaVM
(/nfs/pb/home/aapetren/work/harmony/working_vm/vm/vmcore/src/jni/jni.cpp:495)
   [junit]     13: ?? (??:-1)
   [junit]     14: ?? (??:-1)
   [junit]     15: ?? (??:-1)
   [junit]     16: hysig_protect
(/nfs/pb/home/aapetren/work/harmony/working_classlib/modules/portlib/src/main/native/port/unix/hysignal.c:283)
   [junit]     17: ?? (??:-1)
   [junit]     18: __libc_start_main (??:-1)
   [junit]     19: ?? (??:-1)
   [junit] <end of stack trace>
   [junit] Tests FAILED

And something like this on windows...

SY, Alexey

P.S. I do not have latest Gregory's patch yet.

2006/12/13, Geir Magnusson Jr. <[EMAIL PROTECTED]>:


Gregory Shimansky wrote:
> Geir Magnusson Jr. wrote:
>> This must be from the recent properties refactoring...
>
> I've found out the reason of the change. It is r486100 in classlib.
> Previously there was no call to GetSystemProperty about
> org.apache.harmony.boot.class.path. I've fixed drlvm function
> GetSystemProperty to return VMI_ERROR_NOT_FOUND in case a property
> cannot be found and set valuePtr to NULL (or otherwise luniglob crashes).
>
> This still doesn't work because org.apache.harmony.boot.class.path is
> not set anywhere, and then bootstrap class loader fails to initialize.
> I'm still trying to find out what else had changed.
>

That property is constructed by luni when the .so is loaded.  If this
doesn't work on em64t, it shouldn't work anywhere...

geir


>> Gregory Shimansky wrote:
>>> Geir Magnusson Jr. wrote:
>>>> No one?
>>>
>>> I think I've reproduced the same problem on ia32 fedora (on other
>>> linuxes everything works ok). I'm trying to investigate. The problem
>>> is in function GetSystemProperty in vm/vmi/src/vmi.cpp
>>>
>>> 146     vmiError JNICALL
>>> 147     GetSystemProperty(VMInterface *vmi, char *key, char **valuePtr)
>>> 148     {
>>> 149         char* value = get_property(key, JAVA_PROPERTIES);
>>> 150         *valuePtr = strdup(value);
>>> 151         destroy_property_value(value);
>>> 152         return VMI_ERROR_NONE;
>>> 153     }
>>>
>>> called like this:
>>>
>>> GetSystemProperty (vmi=0x97ca60, key=0x941e5c
>>> "org.apache.harmony.boot.class.path", valuePtr=0xbf98cd18)
>>>
>>> The function get_property returns NULL, so strdup in line 150
>>> crashes. I don't know yet why
>>> get_property("org.apache.harmony.boot.class.path", JAVA_PROPERTIES)
>>> returns NULL, but calling strdup unconditionally doesn't seem to be a
>>> good idea to me too.
>>>
>>>> Geir Magnusson Jr. wrote:
>>>>> Trying to get the snapshots out... :)
>>>>>
>>>>> I was trying r486163 and drlvm just crashes...
>>>>>
>>>>> Anyone else seeing this?  I'm on ubuntu 6 x86_64.  I don't want to
>>>>> blame luni, but w/ strace, I see the following :
>>>>>
>>>>> 
open("/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/build/deploy/jdk/jre/bin/libhyluni.so",
>>>>> O_RDONLY) = 3
>>>>> read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
>>>>> i\0\0\0"..., 640) = 640
>>>>> fstat(3, {st_mode=S_IFREG|0755, st_size=1238859, ...}) = 0
>>>>> mmap(NULL, 1263224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
>>>>> 3, 0) = 0x2aaabf6e8000
>>>>> mprotect(0x2aaabf71d000, 1046136, PROT_NONE) = 0
>>>>> mmap(0x2aaabf81c000, 4096, PROT_READ|PROT_WRITE,
>>>>> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x2aaabf81c000
>>>>> close(3)                                = 0
>>>>> rt_sigaction(SIGPIPE, NULL, {SIG_DFL}, 8) = 0
>>>>> rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
>>>>> 
stat("/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/build/deploy/jdk/jre/lib/boot/bootclasspath.properties",
>>>>> {st_mode=S_IFREG|0644, st_size=6360, ...}) = 0
>>>>> 
open("/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/build/deploy/jdk/jre/lib/boot/bootclasspath.properties",
>>>>> O_RDONLY) = 3
>>>>> fstat(3, {st_mode=S_IFREG|0644, st_size=6360, ...}) = 0
>>>>> mmap(NULL, 6360, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) =
>>>>> 0x2aaabf81d000
>>>>> close(3)                                = 0
>>>>> munmap(0x2aaabf81d000, 6360)            = 0
>>>>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>>>> rt_sigaction(SIGSEGV, {SIG_DFL}, {0x2aaaac098530, [],
>>>>> SA_RESTORER|SA_STACK|SA_SIGINFO, 0x2aaaab8554d0}, 8) = 0
>>>>> rt_sigreturn(0)                         = 0
>>>>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>>>> +++ killed by SIGSEGV +++
>>>>>
>>>>>
>>>>>
>>>>> geir
>>>>
>>>
>>>
>>
>
>

Reply via email to