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

pkill/pgrep cannot find mongod on Linux

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.5, 3.5.1
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Platforms 2017-01-23
    • 0

    Description

      pkill/pgrep uses the "Name" field in /proc/*/status as the name of process. On Linux, this field is the process name by default. But this field is not the process name, it is the thread name of the main thread. Thread names in Linux simply default to the process name.

      If a program calls pthread_setname_np, the name is updated to be the thread name. This breaks simple commands like "pkill mongod" as an example. The proper command to use instead is "pkill initAndListen" since that is the name of the main thread. This is undesired behavior. MongoDB needs to stop setting thread names on the main() thread as a result of this behavior.

      Reported by david.hows

      Attachments

        Issue Links

          Activity

            People

              mark.benvenuto@mongodb.com Mark Benvenuto
              mark.benvenuto@mongodb.com Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: