harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serguei Zapreyev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1786) Stack Overflow Error detection fails on Linux
Date Tue, 17 Oct 2006 12:38:36 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1786?page=comments#action_12442888 ] 
            
Serguei Zapreyev commented on HARMONY-1786:
-------------------------------------------

The test fails for me as follows:

szapreye@nstdrlel14:~> /nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/build/lnx_ia32_gcc_debug/deploy/jre/bin/java
-classpath 

/nfs/ins/proj/drl/coreapi/ZSS/my_tests  Test 
       (It's my message: shortage of memory: stack is too long to be presented: 457384257
frames)
SIGABRT in VM code.
Stack trace:
        1: ?? (??:-1)
        2: abort (??:-1)
        3: st_get_trace (/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/stack/stack_trace.cpp:159)
        4: Java_org_apache_harmony_vm_VMStack_getStackState 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp:187)
        5: IP is 0x410D3D75 <native code>
        6: java/lang/Throwable.fillInStackTrace()Ljava/lang/Throwable; (??:-1)
        7: java/lang/Throwable.<init>()V (??:-1)
        8: java/lang/Exception.<init>()V (Exception.java:37)
        9: java/lang/RuntimeException.<init>()V (RuntimeException.java:33)
        10: java/lang/NullPointerException.<init>()V (NullPointerException.java:34)
        11: vm_invoke_native_array_stub 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/util/ia32/base/invoke_native_stub_ia32.asm:41)
        12: JIT_execute_method_default(void*, _jmethodID*, jvalue*, jvalue*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/util/ia32/base/ini_iA32.cpp:199)
        13: DrlEMImpl::executeMethod(_jmethodID*, jvalue*, jvalue*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/em/src/DrlEMImpl.cpp:489)
        14: ExecuteMethod (/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/em/src/em_intf.cpp:43)
        15: vm_execute_java_method_array(_jmethodID*, jvalue*, jvalue*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/jit/ini.cpp:58)
        16: class_alloc_new_object_and_run_constructor(Class*, Method*, unsigned char*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/jit/jit_runtime_support.cpp:2212)
        17: create_lazy_exception (/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/exception/exceptions_jit.cpp:149)
        18: exn_propagate_exception 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/exception/exceptions_jit.cpp:337)
        19: exn_athrow_regs(Registers*, Class*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/exception/exceptions_jit.cpp:452)
        20: throw_from_sigcontext (/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/util/linux/signals_ia32.cpp:154)
        21: java_throw_from_sigcontext 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/util/linux/signals_ia32.cpp:175)
        22: null_java_reference_handler(int, siginfo*, void*) 

(/nfs/ins/proj/drl/coreapi/ZSS/G57/trunk/working_vm/vm/vmcore/src/util/linux/signals_ia32.cpp:454)
<end of stack trace>
Aborted
szapreye@nstdrlel14:~> 

It fails because a shortage of memory is detected under the st_alloc_frames(depth) memory
request within st_get_trace().
It happens due to enormous stack depth (about 457384257 frames for me).

So, the jit compiled code of Test.func() leads to SIGSEGV raising. However, 
the stack overflow issue is not detected because the fault address doesn't take up a position
within defined thread's stack. 

So, it should be investigated further why do the jited code or the way of its invocation furnish
a fault address
plased out of the allocated stack?
And are the 457384257 frames acceptable for such cases if about 2097152 stack size is supposed
for a thread?

> Stack Overflow Error detection fails on Linux
> ---------------------------------------------
>
>                 Key: HARMONY-1786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1786
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Tested on Red Hat Enterprise Linux
>            Reporter: Rana Dasgupta
>         Attachments: Stack.java
>
>
> Stack Overflow Detection fails on Linux. A SIGSEGV is raised. Test attached

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message