[SERVER-41319] Generate core dump on fassertNoTrace Created: 24/May/19  Updated: 16/Nov/23  Resolved: 07/Jun/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Andrew Morrow (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to WT-11987 Table's version number dropped to ver... Closed
related to SERVER-83360 Reconsider meaning/behavior of "no tr... Closed
Operating System: ALL
Sprint: Dev Tools 2019-06-17
Participants:

 Description   

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.


Generated at Thu Feb 08 04:57:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.