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 <er...@gmail.com> on 2015/07/25 00:34:06 UTC

Possible deadlock in DefaultSolrCoreState?

I was looking at a report from the field where apparently writerFree
and pauseWriter get out of sync. Looking at the code in
DefaultSolrCoreState I saw something and wondered if I'm off "chasing
an untamed ornithoid". The precursor was a "RELOAD" operation on the
collection.

In closeIndexWriter, pauseWriter is set to true and never set back to
false under any circumstances.

In newIndexWriter, this bit:

pauseWriter = true;
.
.
.
while (!writerFree) {
  try {
    writerPauseLock.wait(100);
  } catch (InterruptedException e) {}

  if (closed) {
    throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
"SolrCoreState already closed");
  }
}

Could conceivably leave pauseWriter set to true in the if (closed) case.

Opinions?

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