bneradt opened a new pull request, #13106: URL: https://github.com/apache/trafficserver/pull/13106
This fixes a deadlock between Diags::tag_table_lock and the dynamic loader lock. The issue occurs when Regex::exec() lazily constructs a thread_local RegexContext whose destructor registration via __cxa_thread_atexit_impl acquires the dl loader lock. Holding tag_table_lock across exec() creates a lock-order inversion with dlopen() callers that construct a DbgCtl during plugin static initialization (which takes tag_table_lock while already holding the dl loader lock). This changes activated_tags to use std::shared_ptr<Regex> and snapshots the regex under the lock before releasing it and calling exec(). The same pattern is applied to activate_taglist() which now compiles the new regex outside the lock. Fixes: #13101 -- 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]
