You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Rana Dasgupta (JIRA)" <ji...@apache.org> on 2006/10/09 16:41:20 UTC

[jira] Created: (HARMONY-1786) Stack Overflow Error detection fails on Linux

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


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

        

[jira] Updated: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "Rana Dasgupta (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1786?page=all ]

Rana Dasgupta updated HARMONY-1786:
-----------------------------------

    Attachment: Stack.java

Attaching test; investigating

> 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

        

[jira] Assigned: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1786?page=all ]

weldon washburn reassigned HARMONY-1786:
----------------------------------------

    Assignee: weldon washburn

> 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
>         Assigned To: weldon washburn
>         Attachments: Stack.java, stackfixes
>
>
> 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

        

[jira] Commented: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "Serguei Zapreyev (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] Updated: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "Rana Dasgupta (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1786?page=all ]

Rana Dasgupta updated HARMONY-1786:
-----------------------------------

    Attachment: stackfixes

This patch fixes the issue reported. The issue is the same as the failure of the smoke test "StackTest". The virtual memory corresponding to the thread stack and alternate signal handling stack need to be mapped before usage. The patch also renables asserts that had been temporarily disabled in the code when we were aplying BBC. Duplicate initialization issues have also been fixed. The patch also reenables "StackTest".

All cunit and smoke tests pass. kernel tests demonstrate exactly the same behaviour before and after the patch.

> 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, stackfixes
>
>
> 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

        

[jira] Commented: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "Rana Dasgupta (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1786?page=comments#action_12442734 ] 
            
Rana Dasgupta commented on HARMONY-1786:
----------------------------------------

I think the test case is a clone of the StackTest ( smoke test ). mprotect() fails with ENOMEM on the main thread when setting up the overflow guard. ENOMEM is a resource failure, sometimes raised when kernel structures cannot be allocated.

> 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

        

[jira] Closed: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1786?page=all ]

weldon washburn closed HARMONY-1786.
------------------------------------

    Resolution: Fixed

Committed.  Smoke tests on windowsxp and Linux w/ gcc 4.0.2 passes.

> 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
>         Assigned To: weldon washburn
>         Attachments: Stack.java, stackfixes
>
>
> 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

        

[jira] Commented: (HARMONY-1786) Stack Overflow Error detection fails on Linux

Posted by "Serguei Zapreyev (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1786?page=comments#action_12443148 ] 
            
Serguei Zapreyev commented on HARMONY-1786:
-------------------------------------------

Rana, I've seen you comments on the issue in harmony-dev letters. Great!

> 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, stackfixes
>
>
> 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