You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2015/08/07 07:45:46 UTC

[jira] [Commented] (SOLR-7836) Possible deadlock when closing refcounted index writers.

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

Erick Erickson commented on SOLR-7836:
--------------------------------------

Well, I've kicked the can down the road, but now there's a different deadlock. I wrote a test to beat the heck out of the update/delete-by-query/reload stuff and after the changes above....

In the morning when I'm fresher I'll look at why there are so many different things that need to have locks on them. But we have updateLock, and loops like below that _seem_ to be locking each other out.

[~yseeley@gmail.com] [~markrmiller@gmail.com] (and anyone else) Loops like this seem fraught, or is it just me and it's late?:
        while (!writerFree) {
          try {
            writerPauseLock.wait(100);
          } catch (InterruptedException e) {}
          if (closed) {
            throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "SolrCoreState already closed");
          }
        }

and wait until some other thread sets writerFree to true. 


> Possible deadlock when closing refcounted index writers.
> --------------------------------------------------------
>
>                 Key: SOLR-7836
>                 URL: https://issues.apache.org/jira/browse/SOLR-7836
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>         Attachments: SOLR-7836.patch
>
>
> Preliminary patch for what looks like a possible race condition between writerFree and pauseWriter in DefaultSorlCoreState.
> Looking for comments and/or why I'm completely missing the boat.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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