harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armand Navabi <anav...@purdue.edu>
Subject Re: [drlvm] [launcher] Executable hangs
Date Thu, 28 Sep 2006 19:38:57 GMT
Making progress...

Ok, the problem with execv() has been solved.  It wasn't finding the
path because of a stupid mistake on my part.  Here was the problem:

1047        if (newPathToAdd[i] != NULL && strstr(oldPath,
newPathToAdd[i]) != 0) {
(gdb) p newPathToAdd[i]
$2 = 0x8067ae8
"/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/default"
(gdb) p oldPath
$3 = 0xbfe4c554
"/homes/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/:/homes/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/default"

I had to change /homes/anavabi to /u/u12/anavabi in LD_LIBRARY_PATH and
then the paths are found, so it never gets to the execv line.  FYI, the
default directory is the one that should not contain a trailing slash. 
Thanks for the help on this one. 

Now gdb is working like a champ, but "java helloworld" is still having
problems.  Here is a stack trace of what happens when I try to run
helloworld in gdb:

(gdb) run helloworld
Starting program:
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/java
helloworld
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 12424)]
[New Thread 32769 (LWP 12427)]
[New Thread 16386 (LWP 12428)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12424)]
0xb7f72d94 in _dl_relocate_object () from /lib/ld-linux.so.2

(gdb) bt
#0  0xb7f72d94 in _dl_relocate_object () from /lib/ld-linux.so.2
#1  0xb7a99fa3 in getutmpx () from /lib/libc.so.6
#2  0xb7f75862 in _dl_catch_error () from /lib/ld-linux.so.2
#3  0xb7a9a745 in _dl_open () from /lib/libc.so.6
#4  0xb79aed00 in ?? () from /lib/libdl.so.2
#5  0xfffffffe in ?? ()
#6  0xb7f80000 in ?? () from /lib/ld-linux.so.2
#7  0xbf9cab68 in ?? ()
#8  0xb7f7ffd4 in ?? () from /lib/ld-linux.so.2
#9  0xb7f7fca0 in ?? () from /lib/ld-linux.so.2
#10 0x0000000c in ?? ()
#11 0xbf9cac38 in ?? ()
#12 0xb7f75862 in _dl_catch_error () from /lib/ld-linux.so.2
#13 0xb7f75862 in _dl_catch_error () from /lib/ld-linux.so.2
#14 0xb79af299 in dlerror () from /lib/libdl.so.2
#15 0xb79aed54 in dlopen () from /lib/libdl.so.2
#16 0xb6ecca78 in apr_dso_load (res_handle=0x0, path=0x0,
pool=0x8090c40) at dso.c:139
#17 0xb6d3baa1 in Dll_JIT (this=0x80a8640,
    dll_filename=0x80a8774
"/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/default//libjitrino.so")
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp:62
#18 0xb6df0f42 in vm_load_jit (
    file_name=0x80a8774
"/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/default//libjitrino.so",
    handle=0xbf9cb1bc) at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_main.cpp:628
#19 0xb6951a9e in DrlEMImpl::buildChains (this=0x80a7e80,
config=@0xbf9cb2c0)
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp:436
#20 0xb6951256 in DrlEMImpl::init (this=0x80a7e80) at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp:362
#21 0xb694f239 in DrlEMFactory::createAndInitEMInstance ()
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp:51
#22 0xb6969a72 in CreateInstance (p_instance=0xb6fc3c28, pool=0x808ec38)
    at /u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/em/src/em_intf.cpp:131
#23 0xb6d37eee in CmCreateInstance (p_instance=0xb6fc3c28,
name=0xb6f1f764 "em")
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmstart/src/compmgr/component_manager_impl.cpp:583
#24 0xb6deed2b in process_properties_dlls (p_env=0xb6fc3a80)
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_main.cpp:147
#25 0xb6df00ea in create_vm (p_env=0xb6fc3a80, vm_arguments=0xbf9cb570)
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_main.cpp:355
#26 0xb6d6865a in JNI_CreateJavaVM (p_vm=0xbf9cb56c, p_env=0xbf9cb568,
vm_args=0xbf9cb570)
    at
/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp:1269
#27 0x0804994d in invocation (portLibrary=0xbf9cb7d0, argc=2,
argv=0xbf9cbbc4, handle=134642856, version=65540,
    ignoreUnrecognized=1 '\001', mainClass=0xbf9cd3a9 "helloworld",
classArg=1, isJvmSubDir=0,
    propertiesFileName=0x8067be0
"/u/u12/anavabi/Harmony/enhanced/drlvm/trunk/build/deploy/jre/bin/default/harmonyvm.properties",
    isStandaloneJar=0, vmdllsubdir=0xbf9cb608 "default") at main.c:623
#28 0x08049095 in gpProtectedMain (args=0xbf9cb7b0) at main.c:360
#29 0x0804b5ad in signalProtectedMain (portLibrary=0xbf9cb7d0,
arg=0xbf9cb7b0) at cmain.c:78
#30 0xb7f573f0 in hysig_protect (portLibrary=0xbf9cb7d0, fn=0x804b59c
<signalProtectedMain>, fn_arg=0xbf9cb7b0,
    handler=0x804b410 <genericSignalHandler>, handler_arg=0x0,
flags=124, result=0xbf9cb7a8) at hysignal.c:332
#31 0x0804b692 in main (argc=2, argv=0xbf9cbbc4, envp=0xbf9cbbd0) at
cmain.c:103

Let me know if there is any other debugging information I can provide.

Thanks,
Armand

Geir Magnusson Jr. wrote:
>
> On Sep 28, 2006, at 3:41 AM, Egor Pasko wrote:
>
>> Looks like a progress :)
>>
>> On the 0x1F2 day of Apache Harmony Armand Navabi wrote:
>>> That did not fix it for me.  I thought I had both the bin directory
>>> and the
>>> default directory in my LD_LIBRARY_PATH.  I just ran it again to
>>> make sure,
>>> and it still seems to get lost on execv().  Is there something
>>> special I
>>> need to call in gdb to skip it?
>>
>> you can always jump in GDB. And I love this feature.
>> Now that should be easy enuough to debug out why the launcher does not
>> see the LD_LIBRARY_PATH and tries to execv. Geir says, it should NOT
>> execv. This is the bug. Seems like an easy one.
>>
>
> This isn't *the* bug he's chasing.  I think that the problem is that
> there's a "/" at the end of one of them (either .../bin/ or
> .../bin/default/ - one of the trailing slashes should be removed...
> but I don't remember which one).  I know our launcher constructs the
> LD_LIBRARY_PATH w/ one of the two w/ the slash, one w/o.  We need to
> fix that for simple consistency, but it is not in itself a bug, as it
> does work fine.
>
> geir
>
>
>> does main.c:1037 (oldPath = getenv (variableName);) work for you?
>>
>> BTW, I remember having to set HYLD_LIBRARY_PATH on OSX. I was very
>> surprized))
>>
>> --Egor Pasko, Intel Managed Runtime Division
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message