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

Sometimes core dumps cannot be examined unless reading .gdbinit is disabled

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • DevProd Build
    • ALL
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Recently, I ran into a gdb crash while trying to examine a core file. Running gdb path/to/mongod path/to/core resulted in the process crashing while printing out the first frame.

      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00007f8a86591b8f in raise () from /lib64/libpthread.so.0
      [Current thread is 1 (Thread 0x7f8a3bfff700 (LWP 3877))]
      *** buffer overflow detected ***: /opt/mongodbtoolchain/v5/bin/gdb terminated
      
      
      Fatal signal: Aborted
      ----- Backtrace -----
      0x527072 ???
      0x62eada ???
      0x7f5d37901b4f ???
      0x7f5d37901acf ???
      0x7f5d378d4ea4 ???
      0x7f5d37942cd6 ???
      0x7f5d379f19c4 ???
      0x7f5d379f19f6 ???
      0x7f5d379efa95 ???
      0x7f5d379f18ea ???
      0x896084 ???
      0x896443 ???
      0x5624da ???
      0x55752a ???
      0x6f86c4 ???
      0x6faf9d ???
      0x6fb4ca ???
      0x448744 ???
      0x7f5d378edd84 ???
      0x45f3dd ???
      0xffffffffffffffff ???
      ---------------------
      A fatal error internal to GDB has been detected, further
      debugging is not possible.  GDB will now terminate.
      
      This is a bug, please report it.  For instructions, see:
      <https://www.gnu.org/software/gdb/bugs/>.
      
      Aborted
      

      max.hirschhorn@mongodb.com was able to help me identify a remedy, which is to pass -nx to gdb, which disables processing .gdbinit. It appears that one or more of the pretty printers we load is causing the downstream issue. Identify which one is broken and either fix it or at least disable it while a fix is worked on.

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: