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

Cpu profiler doesn't produce a valid trace if mongod is shutdown (or a signal is sent)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.0-rc3
    • Fix Version/s: 3.3.4
    • Component/s: Diagnostics
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Platforms 12 (04/01/16)

      Description

      Steps to reproduce:

      $ ./mongo
      > use admin
      switched to db admin
      > db.runCommand({_cpuProfilerStart: {profileFilename: './foo.prof'}});
      { "ok" : 1 }
      

      Then, send a signal, e.g. SIGTERM to mongod, and quit the shell.
      Try to analyze the results with google-pprof.
      Output:

      pprof ./mongod foo.prof 
      Using local file ./mongod.
      Using local file foo.prof.
      substr outside of string at /usr/bin/pprof line 3524.
      Use of uninitialized value in string eq at /usr/bin/pprof line 3524.
      substr outside of string at /usr/bin/pprof line 3526.
      Use of uninitialized value in string eq at /usr/bin/pprof line 3526.
      foo.prof: header size >= 2**16
      

        Attachments

          Activity

            People

            Assignee:
            acm Andrew Morrow
            Reporter:
            davide.italiano Davide Italiano
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: