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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        10d 13h 2m 1 Geir Magnusson Jr 17/Oct/06 00:07
        Resolved Resolved Closed Closed
        982d 19h 48m 1 Mark Hindess 25/Jun/09 19:56
        Mark Hindess made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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.
        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
        Geir Magnusson Jr made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        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
        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
        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.
        Artem Aliev made changes -
        Attachment unsync_suspend.patch [ 12342658 ]
        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
        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.
        Elena Semukhina made changes -
        Field Original Value New Value
        Attachment TestSuspend.java [ 12342409 ]
        Hide
        Elena Semukhina added a comment -

        test to reproduce attached.

        Show
        Elena Semukhina added a comment - test to reproduce attached.
        Elena Semukhina created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development