You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "cmcfarlen (via GitHub)" <gi...@apache.org> on 2023/08/03 15:49:18 UTC

[GitHub] [trafficserver] cmcfarlen commented on pull request #10143: Work-around for deadlock in DbcCtl instance initialization when loading plugins.

cmcfarlen commented on PR #10143:
URL: https://github.com/apache/trafficserver/pull/10143#issuecomment-1664229758

   > This should fix the deadlock, since the DbgCtl lock will be grabbed before the dl_load_lock across the two previously deadlocking threads.
   > 
   > This will block any log messages during the course of loading the plugins, however. Can you explain why you prefer this over your Regex thread_local initialization patch in #10142? As long as we made the Regex type thead_local, it resolved the deadlock by doing the PCRE jit initialization before grabbing the DbgCtl lock.
   
   It would only block Debug macros the first time they are encountered in a codepath.  Places using Dbg or any subsequent encounters of Debug macros would not need to hold this lock as it's only necessary to setup the DbgCtl instance, not to log a message.
   
   I think this workaround is only necessary until everything uses Dbg vs Debug right @ywkaras?  If all of the tags are setup at static initializer time, then there shouldn't be any deadlocking, even for dlopen static initializers.


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org