Harmony
  1. Harmony
  2. HARMONY-1741

Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_suspend() hangs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None

      Description

      Hangs on windows/linux.

      I expected that itis fixed with H-1519 but it is not.

      I'll attach a standalone test to reproduce the issue.

      1. TestSuspend.java
        0.6 kB
        Elena Semukhina
      2. unsync_suspend.patch
        1 kB
        Artem Aliev

        Activity

        Hide
        Elena Semukhina added a comment -

        test to reproduce attached.

        Show
        Elena Semukhina added a comment - test to reproduce attached.
        Hide
        Alexei Fedotov added a comment -

        [drlvm][unit] Blocks http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM

        This issue could be related to http://issues.apache.org/jira/browse/HARMONY-1669. Although, the fix from that issue doesn't fix anything on Linux.

        Show
        Alexei Fedotov added a comment - [drlvm] [unit] Blocks http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM This issue could be related to http://issues.apache.org/jira/browse/HARMONY-1669 . Although, the fix from that issue doesn't fix anything on Linux.
        Hide
        Artem Aliev added a comment -

        Methods suspend() and resume() were synchronized in j.l.Thread,
        so if thread suspends itself, it were suspended under lock, so no one could resumes it or calls other methods. Attached patch removes the synchronization from resume() and suspend(). The synchronization is already done in hythread calls.

        Show
        Artem Aliev added a comment - Methods suspend() and resume() were synchronized in j.l.Thread, so if thread suspends itself, it were suspended under lock, so no one could resumes it or calls other methods. Attached patch removes the synchronization from resume() and suspend(). The synchronization is already done in hythread calls.
        Hide
        Elena Semukhina added a comment -

        I tried the patch, TestSuspend passes; classlib test ThreadTest.test_suspend() passes; cunit, smoke, kernel tests as expected.

        Show
        Elena Semukhina added a comment - I tried the patch, TestSuspend passes; classlib test ThreadTest.test_suspend() passes; cunit, smoke, kernel tests as expected.
        Hide
        Alexey Varlamov added a comment -

        I wonder if we should remove synchronization blocks from some other methods as well - like stop() or interrupt(). I do not grok why these synchronizations needed.

        Show
        Alexey Varlamov added a comment - I wonder if we should remove synchronization blocks from some other methods as well - like stop() or interrupt(). I do not grok why these synchronizations needed.
        Hide
        Geir Magnusson Jr added a comment -

        r464715

        Ubuntu 6 - test case, smoke, c-unit, ~kernel

        Show
        Geir Magnusson Jr added a comment - r464715 Ubuntu 6 - test case, smoke, c-unit, ~kernel
        Hide
        Geir Magnusson Jr added a comment -

        Before I resolve, can someone agree that current failres in kernel j.u.ThreadTest not realted to this fix

        Show
        Geir Magnusson Jr added a comment - Before I resolve, can someone agree that current failres in kernel j.u.ThreadTest not realted to this fix
        Hide
        Mark Hindess added a comment -

        Closing as this test works for me now.

        Show
        Mark Hindess added a comment - Closing as this test works for me now.

          People

          • Assignee:
            Unassigned
            Reporter:
            Elena Semukhina
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development