[ https://issues.apache.org/jira/browse/GEODE-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirk Lund reassigned GEODE-5915: -------------------------------- Assignee: Kirk Lund > ManagementListener.handleEvent logs a warning anytime a system Alert occurs > --------------------------------------------------------------------------- > > Key: GEODE-5915 > URL: https://issues.apache.org/jira/browse/GEODE-5915 > Project: Geode > Issue Type: Test > Components: management > Reporter: Kirk Lund > Assignee: Kirk Lund > Priority: Minor > > The IllegalMonitorStateException is being thrown because the read lock is > acquired only if the ResourceEvent type is not SYSTEM_ALERT, but the code > tries to unlock it unconditionally: > Lock: > {noformat} > if (event == ResourceEvent.CACHE_CREATE || event == > ResourceEvent.CACHE_REMOVE) { > readWriteLock.writeLock().lock(); > } else if (event != ResourceEvent.SYSTEM_ALERT) { > readWriteLock.readLock().lock(); > } > {noformat} > Unlock: > {noformat} > if (event == ResourceEvent.CACHE_CREATE || event == > ResourceEvent.CACHE_REMOVE) { > readWriteLock.writeLock().unlock(); > } else { > readWriteLock.readLock().unlock(); > } > {noformat} > {noformat} > [vm0] [warn 2018/10/23 12:51:35.339 PDT <Pooled Message Processor 2> > tid=0x58] attempt to unlock read lock, not locked by current thread > [vm0] java.lang.IllegalMonitorStateException: attempt to unlock read lock, > not locked by current thread > [vm0] at > java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:444) > [vm0] at > java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:428) > [vm0] at > java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341) > [vm0] at > java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:881) > [vm0] at > org.apache.geode.management.internal.beans.ManagementListener.handleEvent(ManagementListener.java:232) > [vm0] at > org.apache.geode.distributed.internal.InternalDistributedSystem.notifyResourceEventListeners(InternalDistributedSystem.java:2219) > [vm0] at > org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:595) > [vm0] at > org.apache.geode.internal.admin.remote.AlertListenerMessage.process(AlertListenerMessage.java:106) > [vm0] at > org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:367) > [vm0] at > org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:432) > [vm0] at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > [vm0] at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > [vm0] at > org.apache.geode.distributed.internal.ClusterDistributionManager.runUntilShutdown(ClusterDistributionManager.java:954) > [vm0] at > org.apache.geode.distributed.internal.ClusterDistributionManager.doProcessingThread(ClusterDistributionManager.java:820) > [vm0] at > org.apache.geode.internal.logging.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:121) > [vm0] at java.lang.Thread.run(Thread.java:748) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)