cmcfarlen opened a new pull request, #14007:
URL: https://github.com/apache/trafficserver/pull/14007
`traffic_ctl plugin msg` delivers `TS_LIFECYCLE_MSG_HOOK` from the JSONRPC
thread through `APIHook::invoke()`. That only try-locks the hook's
continuation, and if the lock is held it calls `ink_release_assert(0)`. A
plugin that uses one continuation for both its lifecycle message hook and its
session or transaction hooks, which run on the event threads, can therefore
abort `traffic_server` when a message arrives while one of those hooks holds
the mutex:
```
Fatal: src/api/APIHook.cc:58: failed assertion `0`
APIHook::invoke
rpc::handlers::plugins::plugin_send_basic_msg
rpc::JsonRPCManager::Dispatcher::invoke_method_handler
...
rpc::comm::IPCSocketServer::run
```
We hit this intermittently with the `ssntxnorder_verify` test plugin, whose
message hook shares a continuation with its `SSN_CLOSE`/`TXN_CLOSE` hooks. The
crash happened while an event thread was handling `SSN_CLOSE`.
The JSONRPC thread is started with `TSThreadInit`, so it has its own
`EThread` and can block. This change uses `blocking_invoke()`, which waits for
the mutex instead of asserting. The other lifecycle hooks are only delivered
once, at startup or shutdown, so they are left alone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]