Hmm I think if you forgot to call 'Transaction::addPlugin()' you would just leak the plugin object, I don't think it would cause the crash you saw.
On Mon, May 18, 2020 at 6:38 PM Sudheer Vinukonda <sudheervinuko...@yahoo.com.invalid> wrote: > We recently ran into a core dump issue due to one of our > TransactionPlugin's continuations being called back with TXN_CLOSE event. > The current CPPAPI's TransactionPlugin does not expect a call back on > TXN_CLOSE, and asserts on it. This is because the expectation seems to be > that all the continuations for TransactionPlugins attached to the > Transaction are destroyed in the global TXN_CLOSE hook. However, this only > works based on the plugin table in the Transaction object, which gets > populated based on `Transaction::addPlugin()`. Turns out, some of our > plugins do not call `Transaction::addPlugin()` and just create a > `TransactionPlugin()` and register hooks to it resulting in them getting > called back for TXN_CLOSE event as well. > Long story short, it didn't particularly seem unreasonable to add support > to TXN_CLOSE event in TransactionPlugin, since the current API does not > seem to mandate calling `Transaction.addPlugin()`. > > https://github.com/apache/trafficserver/pull/6800 > > Please let me know if there are any concerns/comments.