Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: Searcher might be released twice in the case of a LONG GC #7625

Closed
s1monw opened this issue Sep 6, 2014 · 0 comments · Fixed by #7643
Closed

Internal: Searcher might be released twice in the case of a LONG GC #7625

s1monw opened this issue Sep 6, 2014 · 0 comments · Fixed by #7643

Comments

@s1monw
Copy link
Contributor

s1monw commented Sep 6, 2014

In the case of a long GC searchers might be released twice once by the reaper and once by the actual releasing thread. It's a cosmetic problem since we protect from double releasing but we should fix it.

This has been seen in the field:

org.elasticsearch.ElasticsearchIllegalStateException: Double release 
at org.elasticsearch.index.engine.internal.InternalEngine$EngineSearcher.close(InternalEngine.java:1512) 
at org.elasticsearch.common.lease.Releasables.close(Releasables.java:45) 
at org.elasticsearch.common.lease.Releasables.close(Releasables.java:60) 
at org.elasticsearch.common.lease.Releasables.close(Releasables.java:65) 
at org.elasticsearch.search.internal.DefaultSearchContext.doClose(DefaultSearchContext.java:212) 
at org.elasticsearch.search.internal.SearchContext.close(SearchContext.java:96) 
at org.elasticsearch.search.SearchService.freeContext(SearchService.java:560) 
at org.elasticsearch.search.SearchService.access$100(SearchService.java:97) 
at org.elasticsearch.search.SearchService$Reaper.run(SearchService.java:957) 
@s1monw s1monw added bug labels Sep 6, 2014
@s1monw s1monw self-assigned this Sep 8, 2014
@s1monw s1monw removed the help wanted adoptme label Sep 8, 2014
@clintongormley clintongormley changed the title [CORE] Searcher might be released twice in the case of a LONG GC Internal: Searcher might be released twice in the case of a LONG GC Sep 8, 2014
s1monw added a commit to s1monw/elasticsearch that referenced this issue Sep 8, 2014
Today there are two different ways to cleanup search contexts which can
potentially lead to double releasing of a context. This commit unifies
the methods and prevents double closing.

Closes elastic#7625
s1monw added a commit that referenced this issue Sep 8, 2014
Today there are two different ways to cleanup search contexts which can
potentially lead to double releasing of a context. This commit unifies
the methods and prevents double closing.

Closes #7625
s1monw added a commit that referenced this issue Sep 8, 2014
Today there are two different ways to cleanup search contexts which can
potentially lead to double releasing of a context. This commit unifies
the methods and prevents double closing.

Closes #7625
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Today there are two different ways to cleanup search contexts which can
potentially lead to double releasing of a context. This commit unifies
the methods and prevents double closing.

Closes elastic#7625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants