lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject Re: Can we add isDaemon check to LTC.threadCleanup?
Date Thu, 23 Feb 2012 10:16:29 GMT
I investigated Jetty's QueuedThreadPool code more and I think that I
spotted the bug.

In doStop(), it iterates on all running threads, interrupting them. It does
that in a loop (100 cycles, sleeping for 100*i in each cycle) until all
threads are done. The problem is that one of the threads that it tries to
interrupt is itself (!!), but it cannot interrupt itself, and therefore the
list of threads never gets empty, and it keeps on iterating. I debug-traced
it and I believe that's the problem.

It's very stupid that it does that ...


On Thu, Feb 23, 2012 at 11:45 AM, Dawid Weiss

> > It's not a test case in Lucene, but rather my tests that extend
> > LuceneTestCase :). And I'm sure many of Solr's tests cause these prints
> too,
> > though I didn't verify.
> Yep, they definitely do. I'm working on serious refactorings of
> LuceneTestCase and I'll try to pulled thread management from there
> anyway. Once I get there I'll see what we can do about jetty. I recall
> we had jetty tests throw some lingering threads at us in Carrot2 but
> we somehow managed to shut it down gracefully.
> Dawid
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message