Conversation
trondn
approved these changes
Sep 5, 2026
trondn
left a comment
There was a problem hiding this comment.
Probably wrong to self review ;) but the fact still holds true that we don't want the exceptions to be caught
Author
|
Thanks - this will be tested to some extent before we even adopt it, hopefully no more customisation on the dependency needed and maybe some issues fixed 🤞 |
jimwwalker
force-pushed
the
v2026.08.31.00-couchbase
branch
2 times, most recently
from
September 7, 2026 12:46
6572922 to
880e7d9
Compare
Slightly adapted Dave Rigby's patch: commit 3d4519d Author: Dave Rigby <daver@couchbase.com> Date: Thu Feb 11 14:01:47 2021 +0000 MB-44253: Remove try/catch from Executor*::runTask methods These try/catch blocks prevent unhandled exceptions in GlobalTasks from triggering std::terminate, and in turn generating a Breakpad minidump with the state of the process when the exception was thrown (as opposed to where it was caught). Started a discussion with Folly about a more generic way to address this (i.e. making the try/catch somehow optional) - see facebook#1525 - but in the short-term simply remove the invokeCatchingExns() wrapper from our branch. (Note: Currently we only use ThreadPoolExecutor and hence we only /need/ to change that one, but for consistency / possible future use change all instances). Additionally disable the two unit tests which assert the removed exception-catching behaviour (they would now std::terminate): - ThreadedExecutorTest.exception - SerialExecutorTest/*.ExecutionThrows MB-64254: Also drop noexcept from invokeCatchingExns. With noexcept the compiler treats the frame as a terminate handler, so the exception is unwound up to this point before std::terminate runs and the crash backtrace loses every frame above the executor. Without it no handler is found and terminate is called from __cxa_throw with the throwing frame intact.
jimwwalker
force-pushed
the
v2026.08.31.00-couchbase
branch
from
September 7, 2026 12:47
880e7d9 to
06d0710
Compare
trondn
approved these changes
Sep 7, 2026
trondn
merged commit Sep 7, 2026
5eee46b
into
couchbasedeps:v2026.08.31.00-couchbase
5 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slightly adapted Dave Rigby's patch:
commit 3d4519d
Author: Dave Rigby daver@couchbase.com
Date: Thu Feb 11 14:01:47 2021 +0000
Additionally disable the two unit tests which assert the removed exception-catching behaviour (they would now std::terminate):