Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1492 truly shared cache for jars (jobjar/libjar)
  3. YARN-2914

Potential race condition in Singleton implementation of SharedCacheUploaderMetrics, CleanerMetrics, ClientSCMMetrics

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

        public static ClientSCMMetrics getInstance() {
          ClientSCMMetrics topMetrics = Singleton.INSTANCE.impl;
          if (topMetrics == null) {
            throw new IllegalStateException(
      

      getInstance() doesn't hold lock on Singleton.this
      This may result in IllegalStateException being thrown prematurely.

      Chris Trezzo reported that SharedCacheUploaderMetrics has also same kind of race condition.

        Attachments

        1. YARN-2914.002.patch
          11 kB
          Varun Saxena
        2. YARN-2914.patch
          2 kB
          Varun Saxena

          Activity

            People

            • Assignee:
              varun_saxena Varun Saxena
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: