[ 
https://issues.apache.org/jira/browse/SOLR-13058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718242#comment-16718242
 ] 

ASF subversion and git services commented on SOLR-13058:
--------------------------------------------------------

Commit 51a80fb5e19ddffbb9495f4bad1d6e6ed5a954d5 in lucene-solr's branch 
refs/heads/branch_7x from [~gh_at]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=51a80fb ]

SOLR-13058 Fix synchronized block


> Probable synchronization bug in OverseerTaskProcessor
> -----------------------------------------------------
>
>                 Key: SOLR-13058
>                 URL: https://issues.apache.org/jira/browse/SOLR-13058
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: master (8.0)
>            Reporter: Gus Heck
>            Priority: Major
>              Labels: overseer
>         Attachments: SOLR-13058.patch
>
>
>  
> Hit this stack trace:
>  
> {code:java}
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > Throwable #1: com.carrotsearch.randomizedtesting.UncaughtExceptionError: 
> Captured an uncaught exception in thread: Thread[id=746, 
> name=OverseerThreadFactory-164-thread-4, state=RUNNABLE, group=Overseer 
> collection creation process.]
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at __randomizedtesting.SeedInfo.seed([8B3B8797FB9A174E:36FB84D55667AB6]:0)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > Caused by: java.util.ConcurrentModificationException
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at __randomizedtesting.SeedInfo.seed([8B3B8797FB9A174E]:0)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at java.util.AbstractCollection.toString(AbstractCollection.java:461)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> org.apache.solr.cloud.OverseerTaskProcessor.printTrackingMaps(OverseerTaskProcessor.java:614)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> org.apache.solr.cloud.OverseerTaskProcessor.access$700(OverseerTaskProcessor.java:67)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:518)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> solr/beast-results/TimeRoutedAliasUpdateProcessorTest/1/683/stdout- [junit4] 
> > at java.lang.Thread.run(Thread.java:748)
> {code}
> while beasting TimeRoutedAliasUpdateProcessorTest. It appears to be possibly 
> due to this seemingly incorrect synchronization:  
> {code:java}
> synchronized (runningTasks) {
>   runningZKTasks.remove(id);
> }
> {code}
> That should probably be synchronizing on the collection it is modifying 
> similar to these snippets from the same class 
> {code:java}
> synchronized (runningZKTasks) {
>   log.info("RunningZKTasks: {}", runningZKTasks.toString());
> }
> {code}
> {code:java}
> synchronized (runningZKTasks) {
>   log.info("RunningZKTasks: {}", runningZKTasks.toString());
> }{code}
> {code:java}
> synchronized (runningZKTasks) {
>   runningZKTasks.add(head.getId());
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to