trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Mutex use in APIHook::invoke() seems moot and crash prone.

Open ywkaras opened this issue 2 years ago • 0 comments

https://github.com/apache/trafficserver/blob/d18721884615958f151eee084244c506552c6512/src/traffic_server/InkAPI.cc#L1368

What is the point of a mutex, if the application will crash when there is contention for it. If you really want that behavior, you could just use an atomic<bool>, not a mutex. A Yahoo plugin, that uses the TS_LIFECYCLE_SSL_SECRET_HOOK, is crashing at the ink_release_assert(). Because it's expecting a mutex to be, ya know, a mutex.

ywkaras avatar Jun 09 '22 19:06 ywkaras