How to enable mongod coredump?

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Zhang Youdong
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: