Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45893

mongocryptd conflates lock and pid file

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Security 2020-02-24, Security 2020-03-09, Security 2020-03-23

      When starting mongocryptd, I see the following message printed:

      2020-01-30T18:09:35.739-0500 I  CONTROL  [initandlisten] Using lock file: /home/w/apps/ruby-driver/mongocryptd.pid
      

      The lock file and the pid file in Unix are different concepts.

      Lock file: https://dmorgan.info/posts/linux-lock-files/
      Pid file: https://stackoverflow.com/questions/8296170/what-is-a-pid-file-and-what-does-it-contain

      My reading of the source code (the createLockFile function) suggests the file should be named a "pid file" based on how it is used (I do not see any locking being done with it).

      This function references the same path as a "pid file" in other messages.

      Tested on 4.2 server built from source recently.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: