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

How to enable mongod coredump?

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None

      I want to generate corefile when mongod received SIGSEGV to help debuging, but even I comment the signal binding code and recompile, mongod cannot dump corefile when SIGSEGV received, can you guys tell me why? Thanks a lot.

      diff src/mongo/util/signal_handlers_synchronous.cpp

      -        invariant(sigaction(SIGSEGV, &addrSignals, nullptr) == 0);
      -        invariant(sigaction(SIGBUS, &addrSignals, nullptr) == 0);
      +        //invariant(sigaction(SIGSEGV, &addrSignals, nullptr) == 0);
      +        //invariant(sigaction(SIGBUS, &addrSignals, nullptr) == 0);
      

      PS: Another program compiler by the same gcc on the same host can generate corefile when SIGSEGV received.

      $ulimit -c
      unlimited
      
      
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            zyd_com@126.com Zhang Youdong
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: