[
https://issues.apache.org/jira/browse/CONNECTORS-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137650#comment-14137650
]
Karl Wright commented on CONNECTORS-1036:
-----------------------------------------
After the above code was written, we still have an issue with dangling locks on
shutdown. ^C of a running agents process, for instance, yielded:
{code}
Exception in thread "Shutdown thread" java.lang.IllegalStateException: Already
have a lock in place:
'/org.apache.manifoldcf.locks-_IDFACTORY_/write-0000001026'
; can't also write lock
'/org.apache.manifoldcf.servicelock-AGENT_org.apache.manifoldcf.crawler.system.CrawlerAgent'
at
org.apache.manifoldcf.core.lockmanager.ZooKeeperConnection.obtainWriteLockNoWait(ZooKeeperConnection.java:306)
at
org.apache.manifoldcf.core.lockmanager.ZooKeeperLockManager.enterServiceRegistryWriteLock(ZooKeeperLockManager.java:562)
at
org.apache.manifoldcf.core.lockmanager.ZooKeeperLockManager.endServiceActivity(ZooKeeperLockManager.java:484)
at
org.apache.manifoldcf.agents.system.AgentsDaemon.stopAgents(AgentsDaemon.java:169)
at
org.apache.manifoldcf.agents.system.AgentsDaemon$AgentsShutdownHook.doCleanup(AgentsDaemon.java:386)
at
org.apache.manifoldcf.core.system.ManifoldCF.cleanUpEnvironment(ManifoldCF.java:1295)
at
org.apache.manifoldcf.core.system.ManifoldCF$ShutdownThread.run(ManifoldCF.java:1483)
{code}
This implies that a thread interrupt of a write lock wait can cause failure to
clean up lock state. So I will need to audit yesterday's code changes to make
sure the code is safe against that problem.
> Agents shutdown can cause Zookeeper error
> -----------------------------------------
>
> Key: CONNECTORS-1036
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1036
> Project: ManifoldCF
> Issue Type: Bug
> Components: Framework core
> Affects Versions: Manifold 1.7.1, ManifoldCF 2.0
> Reporter: Karl Wright
> Assignee: Karl Wright
> Fix For: Manifold 1.7.1, ManifoldCF 2.0
>
>
> Here's the exception:
> {code}
> WARN 2014-09-17 14:06:52,228 (Shutdown thread) - Exception tossed on
> repository connector pool cleanup: KeeperErrorCode = NoNode for
> /org.apache.manifoldcf.serviceactive-_REPOSITORYCONNECTORPOOL_Web-_ANON_5
> org.apache.manifoldcf.core.interfaces.ManifoldCFException: KeeperErrorCode =
> NoNode for
> /org.apache.manifoldcf.serviceactive-_REPOSITORYCONNECTORPOOL_Web-_ANON_5
> at
> org.apache.manifoldcf.core.lockmanager.ZooKeeperConnection.handleKeeperException(ZooKeeperConnection.java:941)
> at
> org.apache.manifoldcf.core.lockmanager.ZooKeeperConnection.deleteNode(ZooKeeperConnection.java:155)
> at
> org.apache.manifoldcf.core.lockmanager.ZooKeeperLockManager.endServiceActivity(ZooKeeperLockManager.java:478)
> at
> org.apache.manifoldcf.core.connectorpool.ConnectorPool$Pool.releaseAll(ConnectorPool.java:735)
> at
> org.apache.manifoldcf.core.connectorpool.ConnectorPool.closeAllConnectors(ConnectorPool.java:381)
> at
> org.apache.manifoldcf.crawler.repositoryconnectorpool.RepositoryConnectorPool.closeAllConnectors(RepositoryConnectorPool.java:144)
> at
> org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(ManifoldCF.java:110)
> at
> org.apache.manifoldcf.crawler.system.CrawlerAgent.cleanUp(CrawlerAgent.java:105)
> at
> org.apache.manifoldcf.agents.system.AgentsDaemon.stopAgents(AgentsDaemon.java:171)
> at
> org.apache.manifoldcf.agents.system.AgentsDaemon$AgentsShutdownHook.doCleanup(AgentsDaemon.java:386)
> at
> org.apache.manifoldcf.core.system.ManifoldCF.cleanUpEnvironment(ManifoldCF.java:1295)
> at
> org.apache.manifoldcf.core.system.ManifoldCF$ShutdownThread.run(ManifoldCF.java:1483)
> Caused by: org.apache.zookeeper.KeeperException$NoNodeException:
> KeeperErrorCode = NoNode for
> /org.apache.manifoldcf.serviceactive-_REPOSITORYCONNECTORPOOL_Web-_ANON_5
> at
> org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
> at
> org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
> at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:873)
> at
> org.apache.manifoldcf.core.lockmanager.ZooKeeperConnection.deleteNode(ZooKeeperConnection.java:150)
> ... 10 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)