Grokbase Groups Lucene dev June 2016
FAQ
[ https://issues.apache.org/jira/browse/SOLR-9116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Rowe reopened SOLR-9116:
------------------------------

Reopening to backport to 5.6 and 5.5.2.
Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
----------------------------------------------------------------------------------

Key: SOLR-9116
URL: https://issues.apache.org/jira/browse/SOLR-9116
Project: Solr
Issue Type: Bug
Reporter: Jessica Cheng Mallet
Assignee: Shalin Shekhar Mangar
Labels: leak, searcher
Fix For: 6.0.1, 6.1, master (7.0)

Attachments: SOLR-9116.patch


Fix a leak of SolrIndexSearcher when a SolrCore is reloaded. Added a test to expose this leak when run in many iterations (pretty reliable failure with iters=1K), which passes with the fix (ran iters=10K twice).
The fundamental issue is that when an invocation of SolrCore#openNewSearcher is racing with SolrCore#close, if this synchronized block (https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/SolrCore.java#L1611) in openNewSearcher doesn't check for whether or not the core is closed, it can possibly run after the core runs closeSearcher and assign the newly constructed searcher to realtimeSearcher again, which will never be cleaned up. The fix is to check if the SolrCore is closed inside the synchronized block, and if so, clean up the newly constructed searcher and throw an Exception.


--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Search Discussions

  • ASF subversion and git services (JIRA) at Jun 17, 2016 at 9:45 pm
    [ https://issues.apache.org/jira/browse/SOLR-9116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15337037#comment-15337037 ]

    ASF subversion and git services commented on SOLR-9116:
    -------------------------------------------------------

    Commit e86eb9d1ecd6f63b15068b368819e31c4c3e1203 in lucene-solr's branch refs/heads/branch_5_5 from [~shalinmangar]
    [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e86eb9d ]

    SOLR-9116: Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
    (cherry picked from commit d6a5c5a)

    Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
    ----------------------------------------------------------------------------------

    Key: SOLR-9116
    URL: https://issues.apache.org/jira/browse/SOLR-9116
    Project: Solr
    Issue Type: Bug
    Reporter: Jessica Cheng Mallet
    Assignee: Shalin Shekhar Mangar
    Labels: leak, searcher
    Fix For: 5.6, 6.0.1, 6.1, 5.5.2, master (7.0)

    Attachments: SOLR-9116.patch


    Fix a leak of SolrIndexSearcher when a SolrCore is reloaded. Added a test to expose this leak when run in many iterations (pretty reliable failure with iters=1K), which passes with the fix (ran iters=10K twice).
    The fundamental issue is that when an invocation of SolrCore#openNewSearcher is racing with SolrCore#close, if this synchronized block (https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/SolrCore.java#L1611) in openNewSearcher doesn't check for whether or not the core is closed, it can possibly run after the core runs closeSearcher and assign the newly constructed searcher to realtimeSearcher again, which will never be cleaned up. The fix is to check if the SolrCore is closed inside the synchronized block, and if so, clean up the newly constructed searcher and throw an Exception.


    --
    This message was sent by Atlassian JIRA
    (v6.3.4#6332)

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: dev-help@lucene.apache.org
  • ASF subversion and git services (JIRA) at Jun 17, 2016 at 9:45 pm
    [ https://issues.apache.org/jira/browse/SOLR-9116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15337038#comment-15337038 ]

    ASF subversion and git services commented on SOLR-9116:
    -------------------------------------------------------

    Commit d58bff079cca06fa7d54ced6d73fa7ffb8e0df7f in lucene-solr's branch refs/heads/branch_5x from [~shalinmangar]
    [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d58bff0 ]

    SOLR-9116: Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
    (cherry picked from commit d6a5c5a)

    Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
    ----------------------------------------------------------------------------------

    Key: SOLR-9116
    URL: https://issues.apache.org/jira/browse/SOLR-9116
    Project: Solr
    Issue Type: Bug
    Reporter: Jessica Cheng Mallet
    Assignee: Shalin Shekhar Mangar
    Labels: leak, searcher
    Fix For: 5.6, 6.0.1, 6.1, 5.5.2, master (7.0)

    Attachments: SOLR-9116.patch


    Fix a leak of SolrIndexSearcher when a SolrCore is reloaded. Added a test to expose this leak when run in many iterations (pretty reliable failure with iters=1K), which passes with the fix (ran iters=10K twice).
    The fundamental issue is that when an invocation of SolrCore#openNewSearcher is racing with SolrCore#close, if this synchronized block (https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/SolrCore.java#L1611) in openNewSearcher doesn't check for whether or not the core is closed, it can possibly run after the core runs closeSearcher and assign the newly constructed searcher to realtimeSearcher again, which will never be cleaned up. The fix is to check if the SolrCore is closed inside the synchronized block, and if so, clean up the newly constructed searcher and throw an Exception.


    --
    This message was sent by Atlassian JIRA
    (v6.3.4#6332)

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: dev-help@lucene.apache.org
  • Steve Rowe (JIRA) at Jun 17, 2016 at 9:45 pm
    [ https://issues.apache.org/jira/browse/SOLR-9116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Steve Rowe resolved SOLR-9116.
    ------------------------------
            Resolution: Fixed
         Fix Version/s: 5.5.2
                        5.6
    Race condition causing occasional SolrIndexSearcher leak when SolrCore is reloaded
    ----------------------------------------------------------------------------------

    Key: SOLR-9116
    URL: https://issues.apache.org/jira/browse/SOLR-9116
    Project: Solr
    Issue Type: Bug
    Reporter: Jessica Cheng Mallet
    Assignee: Shalin Shekhar Mangar
    Labels: leak, searcher
    Fix For: 5.6, 5.5.2, master (7.0), 6.1, 6.0.1

    Attachments: SOLR-9116.patch


    Fix a leak of SolrIndexSearcher when a SolrCore is reloaded. Added a test to expose this leak when run in many iterations (pretty reliable failure with iters=1K), which passes with the fix (ran iters=10K twice).
    The fundamental issue is that when an invocation of SolrCore#openNewSearcher is racing with SolrCore#close, if this synchronized block (https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/core/SolrCore.java#L1611) in openNewSearcher doesn't check for whether or not the core is closed, it can possibly run after the core runs closeSearcher and assign the newly constructed searcher to realtimeSearcher again, which will never be cleaned up. The fix is to check if the SolrCore is closed inside the synchronized block, and if so, clean up the newly constructed searcher and throw an Exception.


    --
    This message was sent by Atlassian JIRA
    (v6.3.4#6332)

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieslucene
postedJun 17, '16 at 9:44p
activeJun 17, '16 at 9:45p
posts4
users1
websitelucene.apache.org

1 user in discussion

Steve Rowe (JIRA): 4 posts

People

Translate

site design / logo © 2019 Grokbase