Harmony
  1. Harmony
  2. HARMONY-1833

[DRLVM] deadlock during finalization

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      SLES 9 32-bit SP2; CPU 2xXeon x64
      gcc 3.3.3 drlvm debug build
    • Patch Info:
      Patch Available

      Description

      The classlib tests hang sporadically, usually in JNDI module when running all classlib unit tests (single runs of JNDI alone always ok).

      Investigation shows that there are deadlocks happening between main thread (MT) and finalizer thread (FT):
      1) MT performs classloading, it grabs ClassLoader::_lock;
      2) GC happens, FinalizerThread.startFinalization() is called, FT activates;
      3) FT invokes some finalize() method, compilation starts and grabs g_compileLock;
      4) FT waits for ClassLoader::_lock to allocate code_chunk_info;
      5) MT proceeds to compilation of FinalizerThread.spawnBalanceThreads() and waits for g_compileLock;

      1. H-1833.patch
        4 kB
        Alexey Varlamov
      2. H-1833.patch
        4 kB
        Alexey Varlamov

        Activity

        Alexey Varlamov created issue -
        Alexey Varlamov made changes -
        Field Original Value New Value
        Attachment H-1833.patch [ 12342799 ]
        Alexey Varlamov made changes -
        Attachment H-1833.patch [ 12343911 ]
        Alexey Varlamov made changes -
        Patch Info [Patch Available]
        Geir Magnusson Jr made changes -
        Assignee Geir Magnusson Jr [ geir ]
        Geir Magnusson Jr made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Geir Magnusson Jr made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development