No problem -- I think I see what's causing the deadlock (still). I think it's (confusingly!) kill -QUIT to get the thread stacks.
Mike McCandless http://blog.mikemccandless.com On Tue, Jul 26, 2011 at 8:12 AM, Uwe Schindler <u...@thetaphi.de> wrote: > Sorry, I missed to create a stack dump :( > What was the signal for that? -HUP -TERM -KILL? > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > >> -----Original Message----- >> From: Michael McCandless [mailto:luc...@mikemccandless.com] >> Sent: Tuesday, July 26, 2011 1:06 PM >> To: dev@lucene.apache.org >> Subject: Re: svn commit: r1150683 - in >> /lucene/dev/branches/branch_3x/lucene: CHANGES.txt >> src/java/org/apache/lucene/index/DocumentsWriter.java >> >> Ugh, I'll dig. >> >> Uwe was it hung on TestNRTThreads again? And the stack dump looked the >> same as LUCENE-3339? >> >> Mike McCandless >> >> http://blog.mikemccandless.com >> >> On Tue, Jul 26, 2011 at 3:07 AM, Uwe Schindler <u...@thetaphi.de> wrote: >> > We still have a deadlock! I killed the 3.x build few minutes ago. >> > >> > ----- >> > Uwe Schindler >> > H.-H.-Meier-Allee 63, D-28213 Bremen >> > http://www.thetaphi.de >> > eMail: u...@thetaphi.de >> > >> > >> >> -----Original Message----- >> >> From: mikemcc...@apache.org [mailto:mikemcc...@apache.org] >> >> Sent: Monday, July 25, 2011 3:09 PM >> >> To: comm...@lucene.apache.org >> >> Subject: svn commit: r1150683 - in >> /lucene/dev/branches/branch_3x/lucene: >> >> CHANGES.txt src/java/org/apache/lucene/index/DocumentsWriter.java >> >> >> >> Author: mikemccand >> >> Date: Mon Jul 25 13:09:28 2011 >> >> New Revision: 1150683 >> >> >> >> URL: http://svn.apache.org/viewvc?rev=1150683&view=rev >> >> Log: >> >> LUCENE-3339: fix deadlock case when multiple threads add/update doc >> >> blocks >> >> >> >> Modified: >> >> lucene/dev/branches/branch_3x/lucene/CHANGES.txt >> >> >> >> >> lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index >> >> /DocumentsWriter.java >> >> >> >> Modified: lucene/dev/branches/branch_3x/lucene/CHANGES.txt >> >> URL: >> >> >> http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/CHA >> >> NGES.txt?rev=1150683&r1=1150682&r2=1150683&view=diff >> >> >> ========================================================== >> >> ==================== >> >> --- lucene/dev/branches/branch_3x/lucene/CHANGES.txt (original) >> >> +++ lucene/dev/branches/branch_3x/lucene/CHANGES.txt Mon Jul 25 >> >> 13:09:28 2011 >> >> @@ -26,6 +26,10 @@ Bug fixes >> >> suppressed exceptions in the original exception, so stack trace >> >> will contain them. (Uwe Schindler) >> >> >> >> +* LUCENE-3339: Fixed deadlock case when multiple threads use the new >> >> + block-add (IndexWriter.add/updateDocuments) methods. (Robert >> >> +Muir, >> >> + Mike McCandless) >> >> + >> >> New Features >> >> >> >> * LUCENE-3290: Added FieldInvertState.numUniqueTerms >> >> >> >> Modified: >> >> >> lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index >> >> /DocumentsWriter.java >> >> URL: >> >> >> http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src >> >> / >> >> >> java/org/apache/lucene/index/DocumentsWriter.java?rev=1150683&r1=115 >> >> 0682&r2=1150683&view=diff >> >> >> ========================================================== >> >> ==================== >> >> --- >> >> >> lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index >> >> /DocumentsWriter.java (original) >> >> +++ >> >> >> lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index >> >> /DocumentsWriter.java Mon Jul 25 13:09:28 2011 @@ -843,6 +843,12 @@ >> >> final class DocumentsWriter { >> >> final int startDocID = docState.docID; >> >> int docID = startDocID; >> >> >> >> + // We must delay pausing until the full doc block is >> >> + // added, else we can hit deadlock if more than one >> >> + // thread is adding a block and we need to pause when >> >> + // both are only part way done: >> >> + boolean doPauseWaitQueue = false; >> >> + >> >> //System.out.println(Thread.currentThread().getName() + ": A " + >> >> docCount); >> >> for(Document doc : docs) { >> >> docState.doc = doc; >> >> @@ -873,13 +879,10 @@ final class DocumentsWriter { >> >> assert perDoc == null || perDoc.docID == docState.docID; >> >> final boolean doPause; >> >> if (perDoc != null) { >> >> - doPause = waitQueue.add(perDoc); >> >> + doPauseWaitQueue |= waitQueue.add(perDoc); >> >> } else { >> >> skipDocWriter.docID = docState.docID; >> >> - doPause = waitQueue.add(skipDocWriter); >> >> - } >> >> - if (doPause) { >> >> - waitForWaitQueue(); >> >> + doPauseWaitQueue |= waitQueue.add(skipDocWriter); >> >> } >> >> } >> >> >> >> @@ -937,6 +940,10 @@ final class DocumentsWriter { >> >> } >> >> } >> >> } >> >> + >> >> + if (doPauseWaitQueue) { >> >> + waitForWaitQueue(); >> >> + } >> >> } >> >> //System.out.println(Thread.currentThread().getName() + ": A " >> >> + docCount); >> >> >> > >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For >> > additional commands, e-mail: dev-h...@lucene.apache.org >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional >> commands, e-mail: dev-h...@lucene.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org