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

Provide richer unwind information in logged stack traces on POSIX systems.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.1
    • Component/s: Internal Code
    • Labels:
      None

      Description

      The new format should include the load addresses of shared objects, to enable stack tracing in the presence of ASLR, and the GUID/unique build id of the binary, when available, to make it easier to identify the exact set of debugging symbols to use when decoding the backtrace.

      Proposed format:

      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"400000","o":"13f62f0"},{"b":"400000","o":"992c05"},{"b":"400000","o":"992cc6"},{"b":"7f974d559000","o":"fbb0"},{"b":"400000","o":"527072"},{"b":"400000","o":"51a501"},{"b":"400000","o":"51a888"},{"b":"400000","o":"51b38b"},{"b":"400000","o":"51c0d1"},{"b":"400000","o":"6f7b10"},{"b":"400000","o":"5ea49f"},{"b":"400000","o":"39afab"},{"b":"400000","o":"95c822"},{"b":"7f974d559000","o":"7f6e"},{"b":"7f974c76f000","o":"fa9cd"}],"somap"
      : [ { "elfType" : 2, "loadAddr" : "400000", "gnuBuildId" :
      "7BEB4A8E858537106C4D6206BE5D0461849B0912" }, { "loadAddr" : "7FFFA72FE000",
      "elfType" : 3, "gnuBuildId" : "E042D946DA13DAAE6D922FD5B7B080EBBD617E79" }, {
      "loadAddr" : "7F974D559000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0",
      "elfType" : 3, "gnuBuildId" : "B4F5DA4C0C174F671A96E33F25274E0A8CD45984" }, {
      "loadAddr" : "7F974D355000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2",
      "elfType" : 3, "gnuBuildId" : "939D9DA345BA46EB891AEE110BF9D57199D9671E" }, {
      "loadAddr" : "7F974D051000", "path" :
      "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "gnuBuildId" :
      "693661673B9FE5B38C19B83D8A296B6619B8CC39" }, { "loadAddr" : "7F974CD4D000",
      "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "gnuBuildId" :
      "50AE4A8465A9569459546AE74EE5B158B73E04C9" }, { "loadAddr" : "7F974CB37000",
      "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "gnuBuildId" :
      "DF05C4900D5D16CE6BF6C4F5B5BA52176C334AC9" }, { "loadAddr" : "7F974C76F000",
      "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "gnuBuildId" :
      "A2CF0D8A921941EC2D98B231AF91DC1DFE6D2465" }, { "loadAddr" : "7F974D776000",
      "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "gnuBuildId" :
      "91A818FFB801CEC66C0D351DF3D66BE58C4402DA" } ]}
       mongod(_ZN5mongo15SomeCrazyNumberE+0x0) [0x17f62f0]
       mongod(+0x992c05) [0xd92c05]
       mongod(+0x992cc6) [0xd92cc6]
       libpthread.so.0(+0xfbb0) [0x7f974d568bb0]
       mongod(_ZN5mongo11CmdShutdown14shutdownHelperEv+0x152) [0x927072]
       
      mongod(_ZN5mongo11CmdShutdown3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x271)
      [0x91a501]
       
      mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x28)
      [0x91a888]
       
      mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x8eb)
      [0x91b38b]
       
      mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x2b1)
      [0x91c0d1]
       
      mongod(_ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x14c0)
      [0xaf7b10]
       
      mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x5ff)
      [0x9ea49f]
       
      mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xbb)
      [0x79afab]
       mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x482) [0xd5c822]
       libpthread.so.0(+0x7f6e) [0x7f974d560f6e]
       libc.so.6(clone+0x6d) [0x7f974c8699cd]
      ----- END BACKTRACE -----

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              schwerin Andy Schwerin
              Reporter:
              schwerin Andy Schwerin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: