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

mongocryptd pid file does not follow Unix conventions

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Security 2020-02-24, Security 2020-03-09, Security 2020-03-23, Security 2020-04-06, Security 2020-04-20, Security 2020-05-04, Security 2020-05-18, Security 2020-06-01, Security 2020-06-15, Security 2020-06-29

      The Unix convention is for a pid file to contain the process id of the process which created the file. This is described in http://www.pathname.com/fhs/2.2/fhs-5.13.html which I found via https://stackoverflow.com/questions/688343/reference-for-proper-handling-of-pid-file-on-unix.

      mongocryptd produces a file called mongocryptd.pid with the following contents:

      { "port" : 27020, "pid" : 14620 }                                                                             

      This contents is contrary to the expected contents of the pid file.

      For example, using the common Unix idiom of

      kill `cat *pid`
      

      produces:

      kill: illegal pid: {
      kill: illegal pid: "port"
      kill: illegal pid: :
      kill: illegal pid: 27020,
      kill: illegal pid: "pid"
      kill: illegal pid: :
      kill: illegal pid: }
      

      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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: