Skip to content

MB-44253: Remove try/catch from Executor*::runTask methods - #14

Closed
jimwwalker wants to merge 1 commit into
couchbasedeps:mainfrom
jimwwalker:v2026.08.31.00-couchbase
Closed

jimwwalker wants to merge 1 commit into
couchbasedeps:mainfrom
jimwwalker:v2026.08.31.00-couchbase

Conversation

@jimwwalker

Copy link
Copy Markdown

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
https://github.com/facebook/folly/issues/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).

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
@jimwwalker
jimwwalker force-pushed the v2026.08.31.00-couchbase branch from 4ca44af to 4f15ebe Compare September 4, 2026 15:14
@jimwwalker jimwwalker closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants