Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-1816

[DRLVM] drlvm counts non daemon threads incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • DRLVM
    • None
    • Moderate

    Description

      There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
      1. Non daemon threads count being increased by the thread being run
      This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
      2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
      (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
      Basically this causes vm to hang at shutdown if child thread works longer than main method.

      Attachments

        1. HARMONY-1816.patch
          2 kB
          Nikolay Kuznetsov
        2. Test1.java
          0.7 kB
          Nikolay Kuznetsov

        Issue Links

          Activity

            People

              geir Geir Magnusson Jr
              nikolay.kuznetsov Nikolay Kuznetsov
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: