lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyrille Roy (JIRA)" <>
Subject [jira] [Commented] (SOLR-2927) SolrIndexSearcher's register do not match close and SolrCore's closeSearcher
Date Mon, 03 Nov 2014 22:44:34 GMT


Cyrille Roy commented on SOLR-2927:

hi [~shalinmangar],
this is great news.
I have some of the mbeans leaking in the attached mbean-jira-leaked.png that I have attached.
Also, I have been able to fix the leak with the SOLR-2927.patch attached.
Do you still see the leaking mbeans after applying the patch ?

The issue is a race condition.
when opening a core, solr is preventing searchers from firing by starting a thread that blocks
in a single threaded executor at line 783:
searcherExecutor.submit(new Callable() {
public Object call() throws Exception {
return null;

Other events are queued using the thread executor line 864 when calling the getSearcher(false,
false, null, true) method

on exception, the latch is released, so searcher threads can fire and write things in the
mbean using the infoRegistry map.
} catch (Throwable e) {
latch.countDown();//release the latch, otherwise we block trying to do the close. This should
be fine, since counting down on a latch of 0 is still fine
//close down the searcher and any other resources, if it exists, as this is not recoverable

And indeed it is what is happening in close()

we clean the mbean at line 990
try {
} catch (Throwable e) {
SolrException.log(log, e);

and then wait for searcher thread completion at line 1070
try {
} catch (Throwable e) {
SolrException.log(log, e);

putting this before the registry clean actually solves the issue.

> SolrIndexSearcher's register do not match close and SolrCore's closeSearcher
> ----------------------------------------------------------------------------
>                 Key: SOLR-2927
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.0-ALPHA
>         Environment: JDK1.6/CentOS
>            Reporter: tom liu
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 4.9, Trunk
>         Attachments: SOLR-2927.patch, mbean-leak-jira.png
> # SolrIndexSearcher's register method put the name of searcher, but SolrCore's closeSearcher
method remove name of currentSearcher on infoRegistry.
> # SolrIndexSearcher's register method put the name of cache, but SolrIndexSearcher's
close do not remove the name of cache.
> so, there maybe lost some memory leak.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message