-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
Build
-
ALL
-
130
-
4
When an exception propagates out of a noexcept function, the std::terminate and terminate handler are invoked. During that callback, we check for std::current_exception and try to print a nice diagnostic about what exception was thrown, and we log it. However, we see that we reach the std::terminate only to find that std::current_exception is unexpectedly empty.
( BF-17935 and others )
This has the potential to be a very big support and testing problem, as we'll just have crashes in noexcept functions, with no hint as to the cause. I see a lot of effort in other tickets (e.g. SERVER-36434 ) toward noexcept explicitly to improve diagnostics, because the stack trace of a noexcept violation should better locate the problem. But noexcept will in these cases have the opposite effect, and causes the exception to not be logged at all. All we got in the case of BF-17935 was a partially unwound stack trace from the noexcept function and no logged exception details.
Acceptance Criteria:
Write crashing test that violates noexcept and compare vs ordinary uncaught exception propagation on all buildvariants.
Propose a solution or describe rationale for why we can't fix.
- related to
-
SERVER-70148 Document proper noexcept usage
- Needs Scheduling