On Fri, Dec 4, 2015 at 12:31 PM, Adam C. Emerson <aemerson@xxxxxxxxxx> wrote: > Noble Creators of the Squid Cybernetic Swimming in a Distributed Data Sea, > > There is a spectre haunting src/common/assert.cc: The spectre of throw > FailedAssertion. > > This seemingly inconsequential yet villainous statement destroys the > stack frame in which a failing assert statement is evaluated-- a stack > frame of great interest to those hoping to divine the cause of such > failures-- at the moment of their detection. > > This consequence follows from the hope that some caller might be able to > catch and recover from the failure. That is an unworthy goal, for any > failure sufficiently dire to rate an 'assert' is a failure from which > there can be no recovery. As I survey the code, I see FailedAssertion > is only caught as part of unit tests and in a few small programs where > it lead to an immediate exit. > > Therefore! If there is no objection, I would like to submit a patch that > will replace 'throw FailedException' with abort(). In support of this > goal, the patch will also remove attempts to catch FailedException from > driver programs like librados-config and change tests expecting a throw > of FailedAssertion to use the EXPECT_DEATH or ASSERT_DEATH macros instead. > > These changes, taken together, should be non-disruptive and make > debugging easier. I must be missing something here. As far as I can tell, "throw FailedAssertion" only happens in assert.cc, and I know that stuff doesn't destroy the relevant stack frames since I've pulled the info out of core dumps when debugging? -Greg -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html