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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • None
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment