Skip to content

ProviderUtil.lazyInit hangs indefinitely #2655

Open
@hd42

Description

@hd42

Description

I am using an Eclipse plugin that uses Apache POI, which in turn uses Log4j. It runs fine in most configurations, but in some constellations I haven't been able to conclusively pin down (installed the same version twice, one works, the other reproducibly blocks), the UI hangs indefinitely. I took thread dumps in multiple occasions and the main thread always is parked inside ProviderUtil.lazyInit.
What could be the cause of this?

Configuration

Version: 2.23.1

Operating system: Windows 10

JDK: different versions, including JustJ (17.0.10) and Temurin (21.0.3)

Logs

"main" #1 [1584] prio=6 os_prio=0 cpu=14515.62ms elapsed=198.83s tid=0x000001f833061830 nid=1584 waiting on condition  [0x0000002f0f6fb000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.3/Native Method)
	- parking to wait for  <0x00000000813aff10> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
	at java.util.concurrent.locks.LockSupport.park(java.base@21.0.3/LockSupport.java:221)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@21.0.3/AbstractQueuedSynchronizer.java:754)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(java.base@21.0.3/AbstractQueuedSynchronizer.java:1010)
	at java.util.concurrent.locks.ReentrantLock$Sync.lockInterruptibly(java.base@21.0.3/ReentrantLock.java:161)
	at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(java.base@21.0.3/ReentrantLock.java:372)
	at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:151)
	at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:138)
	at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
	at org.apache.poi.util.IOUtils.<clinit>(IOUtils.java:43)
	at org.apache.poi.poifs.filesystem.FileMagic.valueOf(FileMagic.java:209)
	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:222)
	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:185)

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAffects the public APIbugIncorrect, unexpected, or unintended behavior of existing codeosgiAffects OSGi integration

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions