#5167·metrics

ExponentiallyDecayingReservoir | java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread - 4.2.16

Author: atul008Created Feb 24, 2026Updated May 25, 2026

We are facing the following exceptions in our application

Lib version

io.dropwizard.metrics:metrics-core:4.2.16

Logs

Caused by: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread
	at java.base/java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(Unknown Source)
	at java.base/java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(Unknown Source)
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(Unknown Source)
	at java.base/java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(Unknown Source)
	at com.codahale.metrics.ExponentiallyDecayingReservoir.unlockForRegularUsage(ExponentiallyDecayingReservoir.java:205)
	at com.codahale.metrics.ExponentiallyDecayingReservoir.update(ExponentiallyDecayingReservoir.java:114)
	at com.codahale.metrics.ExponentiallyDecayingReservoir.update(ExponentiallyDecayingReservoir.java:84)
	at com.codahale.metrics.Histogram.update(Histogram.java:41)
	at com.codahale.metrics.Timer.update(Timer.java:199)
	at com.codahale.metrics.Timer.update(Timer.java:94)