Harmony
  1. Harmony
  2. HARMONY-5283

[drlvm][gc] OOME causes error in VM code

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      Linux x86, -Xmx128m -Xms128m

      Description

      The following test intermittently causes error. I've marked this issue as critical because it seems to be a regression and causes error of the regression test http://people.apache.org/~smishura/r602144/Linux_x86/func/functional/org/apache/harmony/test/func/reg/vm/btest6962/1118_Btest6962.html

      import java.util.LinkedList;
      import java.util.List;

      public class Test {

      public static void main(String[] args) throws Exception {
      final List<Object> list = new LinkedList<Object>();

      try {
      while (true)

      { list.add(new Object()); }

      } catch (OutOfMemoryError e) {
      }
      }
      }

      Stack:
      Out of Memory!

      SIGABRT in VM code.
      Stack trace:
      addr2line: '[vdso]': No such file
      0: ?? (:-1)
      1: abort (??:-1)
      2: gc_gen_reclaim_heap(GC_Gen*, long long) (weak_roots.cpp:-1)
      3: gc_reclaim_heap(GC*, unsigned int) (weak_roots.cpp:-1)
      4: fspace_alloc(unsigned int, Allocator*) (weak_roots.cpp:-1)
      5: nos_alloc(unsigned int, Allocator*) (weak_roots.cpp:-1)
      6: gc_alloc (??:-1)
      7: vm_malloc_with_thread_pointer(unsigned int, unsigned int, void*) (apr_strtok.c:-1)
      8: 0xB6973505 <Generated stub>
      9: ?? (??:-1)
      10: org/apache/harmony/test/func/reg/vm/btest6962/LongList.test(Ljava/util/logging/Logger;[Ljava/lang/String;)I (LongList.java:37)
      11: ?? (??:-1)
      12: .L294 (ini_iA32.cpp:-1)
      13: DrlEMImpl::executeMethod(_jmethodID*, jvalue*, jvalue*) (inet_pton.c:-1)
      14: ExecuteMethod (em_intf.cpp:-1)
      15: vm_execute_java_method_array (apr_strtok.c:-1)
      16: call_static_method_no_ref_result(JNIEnv_External*, _jobject*, _jmethodID*, jvalue*, jvalue*) (jni_method.cpp:-1)
      17: CallStaticVoidMethodV(JNIEnv_External*, _jobject*, _jmethodID*, char*) (apr_strtok.c:-1)
      18: CallStaticVoidMethod(JNIEnv_External*, _jobject*, _jmethodID*, ...) (apr_strtok.c:-1)
      19: main_runJavaMain (??:-1)
      20: invocation (main.c:-1)
      21: gpProtectedMain (??:-1)
      22: signalProtectedMain (cmain.c:-1)
      23: hysig_protect (utf8decode.c:-1)
      24: main (??:-1)
      25: __libc_start_main (??:-1)
      26: _start (??:-1)
      27: org/apache/harmony/test/func/reg/vm/btest6962/LongList.main([Ljava/lang/String;)V (LongList.java:30)
      <end of stack trace>

      1. H5283.fixed.new.patch
        1 kB
        Chunrong Lai
      2. H5283.fixed.patch
        1 kB
        Chunrong Lai

        Activity

        Hide
        Tim Ellison added a comment -

        Removing version flag and marking as major since the commit was reverted.

        Show
        Tim Ellison added a comment - Removing version flag and marking as major since the commit was reverted.
        Hide
        Xiao-Feng Li added a comment -

        Reopen the issue since the commit was reverted.

        Show
        Xiao-Feng Li added a comment - Reopen the issue since the commit was reverted.
        Hide
        Xiao-Feng Li added a comment -

        I suggest to delay this patch commit after M4. As I said, it's not a
        regression. The commit does fix this issue, while it may have some
        risk for other test case(s).

        Thanks,
        xiaofeng


        http://xiao-feng.blogspot.com

        Show
        Xiao-Feng Li added a comment - I suggest to delay this patch commit after M4. As I said, it's not a regression. The commit does fix this issue, while it may have some risk for other test case(s). Thanks, xiaofeng – http://xiao-feng.blogspot.com
        Hide
        Chunrong Lai added a comment -


        Format problem exists in last patch. Please use this updated one. Thanks.

        Show
        Chunrong Lai added a comment - Format problem exists in last patch. Please use this updated one. Thanks.
        Hide
        Xiao-Feng Li added a comment -

        It's not a regression, because there are no real GC commits that can affect this test case. It's an intermittent failure.

        Anyway, it's fixed.

        Show
        Xiao-Feng Li added a comment - It's not a regression, because there are no real GC commits that can affect this test case. It's an intermittent failure. Anyway, it's fixed.
        Hide
        Chunrong Lai added a comment -


        Here is the patch.

        Show
        Chunrong Lai added a comment - Here is the patch.
        Hide
        Chen Yang added a comment -

        I can reproduce the bug rarely, with about 10%(2/20) probability. And I am now investigating the cause.

        Show
        Chen Yang added a comment - I can reproduce the bug rarely, with about 10%(2/20) probability. And I am now investigating the cause.

          People

          • Assignee:
            Xiao-Feng Li
            Reporter:
            Andrey Pavlenko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development