nilsson-petter commented on issue #3399: URL: https://github.com/apache/logging-log4j2/issues/3399#issuecomment-2596927131
I will provide a bit more context for this issue. We use Spring Kafka in this application. We are consuming one topic, using ordinary threads. We are producing to another topic, doing so with a thread pool of 32 Java 21 Virtual Threads. Perhaps this is not playing along very nicely at times. We copied `InternalLoggerRegistry` to the classpath and added some logging statements over when a thread is 1. Waiting to obtain a lock (WAITING) 2. Has aquired a lock (LOCKED) 3. Has released a lock (UNLOCKED) The logging statements contain context on which thread/name of the logger that is aqcuiring the lock. It starts to look a bit funky closer to the end, with `virtual-thread-spring-kafka-producer-30` and `virtual-thread-spring-kafka-producer-0` competing. At the end, we have three statements of WAITING for the `readLock`. The application did not recover from this and went OutOfMemory short after. ``` WAITING getLogger() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 LOCKED getLogger() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 UNLOCKED getLogger() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 WAITING computeIfAbsent() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 LOCKED computeIfAbsent() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 UNLOCKED computeIfAbsent() name=org.apache.kafka.common.utils.KafkaThread thread=virtual-thread-spring-kafka-producer-3 WAITING getLogger() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 LOCKED getLogger() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 UNLOCKED getLogger() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 WAITING computeIfAbsent() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 LOCKED computeIfAbsent() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 UNLOCKED computeIfAbsent() name=io.confluent.kafka.schemaregistry.avro.AvroSchema thread=virtual-thread-spring-kafka-producer-3 WAITING getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 WAITING getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-0 LOCKED getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-0 UNLOCKED getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-0 WAITING computeIfAbsent() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-0 LOCKED getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 UNLOCKED getLogger() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 WAITING computeIfAbsent() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 LOCKED computeIfAbsent() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 UNLOCKED computeIfAbsent() name=org.apache.kafka.clients.producer.internals.BuiltInPartitioner thread=virtual-thread-spring-kafka-producer-30 WAITING getLogger() name=org.apache.kafka.common.record.MemoryRecords thread=virtual-thread-spring-kafka-producer-30 WAITING getLogger() name=org.apache.kafka.common.requests.OffsetFetchRequest thread=kafka-consumer-0-C-1 WAITING getLogger() name=org.eclipse.jetty.io.IdleTimeout thread=qtp1380654192-171 ``` -- 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