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

Generate core dump on fassertNoTrace

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • ALL
    • Dev Tools 2019-06-17

      On Linux we don't generate core dumps on fassertFailedNoTraceWithLocation() and fassertFailedWithStatusNoTraceWithLocation() because they call quickExit(EXIT_ABRUPT), which calls std::exit(14). Operating system will consider it as a normal exit. By contrast, fassert() and invariant() call std::abort() which will let OS take a core dump.

      When writing code, we choose between fassert and invariant based on whether it could happen unexpectedly (e.g. due to user's operational failures or unexpected on-disk data) or it shouldn't happen (e.g. logical bug). Both of them generate core dumps. However fassertNoTrace() doesn't. fassertNoTrace() is meant to suppress the stack trace, so whether is should generate core dump is debatable. Core dump will definitely help debugging though.

      On Windows, mongod takes its own minidumps, so it might be a different story.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: