freelon commented on issue #3399: URL: https://github.com/apache/logging-log4j2/issues/3399#issuecomment-2615540257
@vy So for the easy part: 1. The latest **working** version is 2.24.1 2. The latest **not** working version is 2.24.3 (the problem appears in 2.24.2 as well) 3. OpenJDK Runtime Environment Temurin-21.0.2+13 4. We do not use virtual threads. While the app is running on Java 21 our internal libs are still compiled for Java 8 so not possible. 5. The full thread-dump is in the file, I just removed our internal names. You will see some packages beginning with `shaded.by.configuration` - those are all the dependencies of our internal zookeeper-configuration library that we deliver in a fixed variant as shaded dependencies. [Threaddump.txt](https://github.com/user-attachments/files/18557522/Threaddump.txt) For the pseudo-code part I'll try my best explaining it here 🙈 : We have a custom `Log4jConfiguration extends AbstractConfiguration`. It overwrites `getLoggerConfig(String loggerName)`: ``` if not loggerName.startsWith("shaded.by.configuration" or "com.example.configuration" or "org.apache.zookeeper/curation") reconfigure() return super.getLoggerConfig(loggerName) ``` `reconfigure` obtains all logger settings from our zookeeper wrapper where we can change the log levels during runtime (like setting `logger.com.example.important=DEBUG`. This is a blocking call on apache curator (a libray on top of zookeeper). Zookeeper/Curator uses multiple threads (as you can see in the stack traces) to coordinate itself. While the application `main` thread awaits zookeeper to go to state `CONNECTED` (while holding the log4j InternalLoggerRegistry lock) another zookeeper thread that is managing the TCP connection to the zookeeper server and also initializes a logger - running into the lock held by the first thread. Since the tcp connection thread is now blocked the connection to the zookeeper server cannot succeed and therefor the main thread, waiting for the connection watcher going to status CONNECTED never unblocks, never releasing the InternalLoggerRegistry lock etc. Is this helpful and understandable? If this does not get any further I will invest some time to try and build a reproducable example that I can share. -- 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: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org