Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2170

Very hot pthread mutex lock in SetConnIdentity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cf-serverd
    • Labels:
      None

      Description

      @cf-serverd/server_common.c:SetConnIdentity()@:
      <pre>
      static pthread_mutex_t pwnam_mtx = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
      struct passwd *pw = NULL;

      if (ThreadLock(&pwnam_mtx))
      {
      pw = getpwnam(conn->username);
      if (pw != NULL)

      { conn->uid = pw->pw_uid; }

      ThreadUnlock(&pwnam_mtx);
      }
      </pre>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10038 jimis (Dimitrios Apostolou)
                Reporter:
                a10038 jimis (Dimitrios Apostolou)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel

                    Time Tracking

                    Estimated:
                    Original Estimate - 3 hours
                    3h
                    Remaining:
                    Not Specified
                    Logged:
                    Time Not Required
                    Not Specified