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/11/05 21:43:30 UTC

Zombie threads and ThreadLeadLingering

We're making significant progress on the CDCR tests, the current code
(I'll check it in Real Soon Now as it's certainly an improvement) is
now having a problem with leaking zombie threads (4 of 100 runs), but
no other errors at least on the suite I'm running that's given us
trouble before.

I found the ThreadLeakLingering annotation and made the assumption
that the below would wait 60 seconds for threads to terminate on the
assumption that there were just some slow threads terminating, but it
didn't seem to cure the problem. I'll try with a longer value, but
wondered if this annotation was doing what I expected.

@ThreadLeakLingering(linger = 60000)

Thanks!
Erick

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


Re: Zombie threads and ThreadLeadLingering

Posted by Erick Erickson <er...@gmail.com>.
Great, thanks for the confirmation!

Erick

On Thu, Nov 5, 2015 at 1:43 PM, Dawid Weiss <da...@gmail.com> wrote:
>> but wondered if this annotation was doing what I expected.
>>
>> @ThreadLeakLingering(linger = 60000)
>
> Yes, it's doing what you think it's doing. But 60 seconds lingering
> time is *really* long. This annotation was added because in certain
> scenarios you don't have direct control over forked threads (as in
> thread pools). The threads there eventually die, but there is no way
> to call join() on them.
>
> The typical lingering in such scenarios is well below one second... If
> a thread is lingering for more than 10 seconds then I'd say the
> chances of it quitting are zero (and something is not right).
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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


Re: Zombie threads and ThreadLeadLingering

Posted by Dawid Weiss <da...@gmail.com>.
> but wondered if this annotation was doing what I expected.
>
> @ThreadLeakLingering(linger = 60000)

Yes, it's doing what you think it's doing. But 60 seconds lingering
time is *really* long. This annotation was added because in certain
scenarios you don't have direct control over forked threads (as in
thread pools). The threads there eventually die, but there is no way
to call join() on them.

The typical lingering in such scenarios is well below one second... If
a thread is lingering for more than 10 seconds then I'd say the
chances of it quitting are zero (and something is not right).

Dawid

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