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)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.4
    • Affects Version/s: 2.6.0-rc3
    • Component/s: Diagnostics
    • None
    • Fully Compatible
    • ALL
    • Platforms 12 (04/01/16)

      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
      

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: