[
https://issues.apache.org/jira/browse/OAK-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13978059#comment-13978059
]
Michael Dürig commented on OAK-1759:
------------------------------------
This is a side effect of a workaround of a bug in the JCR specification ;-)
Specifically, OAK-1290 introduced breaking the deadlock that might occur when
unregistering a listener. This is where the warning 'Timed out waiting for
change processor to stop' is issued. However this introduces a race, which
might cause the {{BackgroundObserver}} to try dispatching further events after
it has been already closed. While we can reduce the size of the window for the
race, I don't think we can close it completely without introducing potential
for deadlocks again. What we could do is to decide after the fact by catching
that {{ISE}} and only re-throw it when the {{BackgroundObserver}} has not been
closed yet.
> Sporadic IllegalStateException in AbstractServiceTracker.getServices
> --------------------------------------------------------------------
>
> Key: OAK-1759
> URL: https://issues.apache.org/jira/browse/OAK-1759
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 0.20
> Reporter: Stefan Egli
> Assignee: Michael Dürig
>
> Seeing the below IlegalStateException about tracker being null several times
> on a 4-node oak-mongo cluster. There were no log.warn 'Timed out waiting for
> change processor to stop' near those errors (but there was once hour(s)
> before in one case).
> {code}16.04.2014 05:34:50.908 *ERROR* [oak-executor-1619]
> org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception
> in Thread Thread[oak-executor-1619,1,Configuration
> Admin Service]
> java.lang.IllegalStateException: null
> at
> com.google.common.base.Preconditions.checkState(Preconditions.java:134)
> at
> org.apache.jackrabbit.oak.spi.whiteboard.AbstractServiceTracker.getServices(AbstractServiceTracker.java:60)
> at
> org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardExecutor.execute(WhiteboardExecutor.java:40)
> at
> org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1.run(BackgroundObserver.java:130)
> at
> org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$ListenableFutureTask.run(BackgroundObserver.java:283)
> at
> org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$ListenableFutureTask.done(BackgroundObserver.java:278)
> at java.util.concurrent.FutureTask$Sync.innerSet(FutureTask.java:281)
> at java.util.concurrent.FutureTask.set(FutureTask.java:141)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:339)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)