java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread

Atlassian JIRA | David Yu | 3 years ago
  1. 0

    On JIRA 6.1.5, if you edit SLA rules on a project a few times rapidly, I notice this stacktrace gets generated. If I disable the Webhook plugin completely, then the problem goes away. I don't see any weird side-effects other than the error messages. {code} 2013-12-31 00:08:55,828 JiraTaskExectionThread-20 ERROR xxxx 6x4873x1 lvswjo 172.25.28.203 /rest/servicedesk/1/servicedesk/AURA/sla/consistency [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event 'com.atlassian.jira.issue.index.ReindexIssuesStartedEvent@2974d43b' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(java.lang.Object), listener=com.atlassian.webhooks.plugin.WebHookEventsProcessor@658ef2dc}'. java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:460) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:437) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:430) at com.atlassian.jira.issue.index.DefaultIndexManager.release(DefaultIndexManager.java:417) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at com.sun.proxy.$Proxy147.release(Unknown Source) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy147.release(Unknown Source) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy147.release(Unknown Source) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.processIssuesById(ConsistencyTask.java:229) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.processIssues(ConsistencyTask.java:139) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.doMigrate(ConsistencyTask.java:100) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.call(ConsistencyTask.java:63) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.call(ConsistencyTask.java:23) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:447) at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:431) at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:883) at com.atlassian.webhooks.plugin.OsgiWebHookProviderWebHookRegistry.getWebHooks(OsgiWebHookProviderWebHookRegistry.java:103) at com.atlassian.webhooks.plugin.DelegatingWebHookRegistry$2.apply(DelegatingWebHookRegistry.java:40) at com.atlassian.webhooks.plugin.DelegatingWebHookRegistry$2.apply(DelegatingWebHookRegistry.java:36) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.google.common.collect.Iterables$3.next(Iterables.java:505) at com.google.common.collect.Iterables$3.next(Iterables.java:498) at com.google.common.collect.Iterators$5.hasNext(Iterators.java:540) at com.atlassian.webhooks.plugin.WebHookEventsProcessor.doOnEvent(WebHookEventsProcessor.java:37) at com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(WebHookEventsProcessor.java:32) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ... 36 more {code}

    Atlassian JIRA | 3 years ago | David Yu
    java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread
  2. 0

    On JIRA 6.1.5, if you edit SLA rules on a project a few times rapidly, I notice this stacktrace gets generated. If I disable the Webhook plugin completely, then the problem goes away. I don't see any weird side-effects other than the error messages. {code} 2013-12-31 00:08:55,828 JiraTaskExectionThread-20 ERROR xxxx 6x4873x1 lvswjo 172.25.28.203 /rest/servicedesk/1/servicedesk/AURA/sla/consistency [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event 'com.atlassian.jira.issue.index.ReindexIssuesStartedEvent@2974d43b' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(java.lang.Object), listener=com.atlassian.webhooks.plugin.WebHookEventsProcessor@658ef2dc}'. java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:460) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:437) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:430) at com.atlassian.jira.issue.index.DefaultIndexManager.release(DefaultIndexManager.java:417) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at com.sun.proxy.$Proxy147.release(Unknown Source) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy147.release(Unknown Source) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy147.release(Unknown Source) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.processIssuesById(ConsistencyTask.java:229) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.processIssues(ConsistencyTask.java:139) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.doMigrate(ConsistencyTask.java:100) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.call(ConsistencyTask.java:63) at com.atlassian.servicedesk.internal.sla.task.ConsistencyTask.call(ConsistencyTask.java:23) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:447) at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:431) at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:883) at com.atlassian.webhooks.plugin.OsgiWebHookProviderWebHookRegistry.getWebHooks(OsgiWebHookProviderWebHookRegistry.java:103) at com.atlassian.webhooks.plugin.DelegatingWebHookRegistry$2.apply(DelegatingWebHookRegistry.java:40) at com.atlassian.webhooks.plugin.DelegatingWebHookRegistry$2.apply(DelegatingWebHookRegistry.java:36) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.google.common.collect.Iterables$3.next(Iterables.java:505) at com.google.common.collect.Iterables$3.next(Iterables.java:498) at com.google.common.collect.Iterators$5.hasNext(Iterators.java:540) at com.atlassian.webhooks.plugin.WebHookEventsProcessor.doOnEvent(WebHookEventsProcessor.java:37) at com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(WebHookEventsProcessor.java:32) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ... 36 more {code}

    Atlassian JIRA | 3 years ago | David Yu
    java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-448].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}Hi Jamie, I think this one is for real this time. :-) I wrote a script listener meant to go from one status to one of the next linked statuses in our workflow, following an "Issue Assigned" event firing. And after much effort to build this script for efficiency, accuracy and functionality, I am incurring stacktrace dumps AFTER a successful TransitionValidationResult test. :-( In this description I will paste in the stacktrace, or an excerpt of meaningful lines from the stack, and I'll attach my source code so you can see my implementation. I know it's exhausting to look at everyone's code, but I can tell you that the point of stacktrace occurs exactly at the call to issueService.transition(). 2014-05-16 14:28:54,037 http-bio-8080-exec-35 ERROR lsccad 868x98837x1 zhe304 192.168.27.109,192.168.85.33 /secure/AssignIssue.jspa [atlassian.event.internal. AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@6028fbea[issue=SOF-118941,c omment=<null>,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,418437][author,lsccad][created,2014-05-16 14:28:53.399][issue,169745],eventTypeId=3,send Mail=true,params={eventsource=action, baseurl=http://jira},subtasksUpdated=true]' from the invoker 'SingleParameterMethodListenerInvoker{method=public void co m.onresolve.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.jira.groovy.listene r.ScriptRunnerUberListener@78e8d4e8}'. java.lang.RuntimeException: No such property: issueService for class: com.test.LscJiraUtilListener at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17) at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:124) at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchEvent(DefaultIssueEventManager.java:102) at com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:88) at com.atlassian.jira.issue.managers.DefaultIssueManager.doUpdate(DefaultIssueManager.java:598) at com.atlassian.jira.issue.managers.DefaultIssueManager.updateIssue(DefaultIssueManager.java:584) at com.atlassian.jira.web.action.issue.AssignIssue.doExecute(AssignIssue.java:141) at webwork.action.ActionSupport.execute(ActionSupport.java:165) Another excerpt of stack trace follows this line: Caused by: groovy.lang.MissingPropertyException: No such property: issueService for class: com.test.LscJiraUtilListener at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:86) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at com.test.LscJiraUtilListener.workflowEvent(LscJiraUtilListener.groovy:95) at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source) at com.onresolve.jira.groovy.canned.workflow.listeners.CustomListener.doScript(CustomListener.groovy:65) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:63) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52)

    JIRA | 3 years ago | Carl Eckhardt
    java.lang.RuntimeException: No such property: issueService for class: com.test.LscJiraUtilListener

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      attempt to unlock read lock, not locked by current thread

      at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke()
    2. com.atlassian.event
      EventPublisherImpl.publish
      1. com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
      2. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
      3. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
      4. com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
      5. com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
      6. com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
      6 frames
    3. com.atlassian.jira
      DefaultIndexManager.reIndexIssues
      1. com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:460)
      2. com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:437)
      3. com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues(DefaultIndexManager.java:430)
      3 frames