Harmony
  1. Harmony
  2. HARMONY-2229

[drlvm][threads] ThreadTest hangs on multiprocessor boxes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      multiprocessor machines, both Windows2003 and Linux (suse9) 32 bit

      Description

      The org.apache.harmony.luni.tests.java.lang.ThreadTest always hangs on drlvm on multiprocessor boxes.

        Activity

        Hide
        Alexey Varlamov added a comment -

        Hmm, just a guess - could this be a race in thread creation? The main difference for various HW here is timing, I see no multi-processor specifics in the fix...

        Show
        Alexey Varlamov added a comment - Hmm, just a guess - could this be a race in thread creation? The main difference for various HW here is timing, I see no multi-processor specifics in the fix...
        Hide
        Alexey Varlamov added a comment -

        The patch looks absolutely correct, applied at r477141.
        If no severe regression will be reported, will close this issue in a day.

        Show
        Alexey Varlamov added a comment - The patch looks absolutely correct, applied at r477141. If no severe regression will be reported, will close this issue in a day.
        Hide
        Salikh Zakirov added a comment -

        test_native_basic fails occasionally on a Windows 2003 server, multiprocessor, with all test cases passed, but with non-zero status code 128.
        Sometimes, a debug window is shown, either with a segfault or attempt to free invalid pointer.

        The test also fails before the patch, however, it looks like this patch somehow increases the probability of the failure.

        Show
        Salikh Zakirov added a comment - test_native_basic fails occasionally on a Windows 2003 server, multiprocessor, with all test cases passed, but with non-zero status code 128. Sometimes, a debug window is shown, either with a segfault or attempt to free invalid pointer. The test also fails before the patch, however, it looks like this patch somehow increases the probability of the failure.
        Hide
        Salikh Zakirov added a comment -

        Unit test test_native_basic failed with the patch, looking into it now...

        Show
        Salikh Zakirov added a comment - Unit test test_native_basic failed with the patch, looking into it now...
        Hide
        Salikh Zakirov added a comment -

        reset-safepoint_callback-to-NULL.patch fixes a state problem in reset_thread(): reset safepoint_callback to NULL,
        because caller of hythread_set_safepoint_callback() expect it either to be NULL, or to become NULL soon.
        Neither is the case if the thread was terminated shortly after setting a callback, and the thread block got reused for another thread.

        It fixes hang in ThreadTest on both Linux and Windows.

        Show
        Salikh Zakirov added a comment - reset-safepoint_callback-to-NULL.patch fixes a state problem in reset_thread(): reset safepoint_callback to NULL, because caller of hythread_set_safepoint_callback() expect it either to be NULL, or to become NULL soon. Neither is the case if the thread was terminated shortly after setting a callback, and the thread block got reused for another thread. It fixes hang in ThreadTest on both Linux and Windows.
        Show
        Alexei Fedotov added a comment - See http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM

          People

          • Assignee:
            Alexey Varlamov
            Reporter:
            Alexey Varlamov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development