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

[CI] Failure in SumIT.testSingleValuedFieldWithFormatter #49778

Closed
original-brownbear opened this issue Dec 2, 2019 · 3 comments · Fixed by #49829
Closed

[CI] Failure in SumIT.testSingleValuedFieldWithFormatter #49778

original-brownbear opened this issue Dec 2, 2019 · 3 comments · Fixed by #49829
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI

Comments

@original-brownbear
Copy link
Member

In https://gradle-enterprise.elastic.co/s/zyfrpx2dhy4tq/console-log?anchor=4774 7.x

REPRODUCE WITH: ./gradlew ':server:integTest' --tests "org.elasticsearch.search.aggregations.metrics.SumIT.testSingleValuedFieldWithFormatter" -Dtests.seed=51FCA3F5A8A9E7FA -Dtests.security.manager=true -Dtests.locale=is-IS -Dtests.timezone=IST -Dcompiler.java=12 -Druntime.java=8
 

Fails with some NPE:


org.elasticsearch.search.aggregations.metrics.SumIT > testSingleValuedFieldWithFormatter FAILED |  
-- | --
  | Failed to execute phase [dfs_query], |  
  |   |  
  | Caused by: |  
  | java.lang.NullPointerException

@original-brownbear original-brownbear added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Dec 2, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@iverase
Copy link
Contributor

iverase commented Dec 3, 2019

I found more errors like this one, it does not reproduce. The stack trace looks like:

Caused by: java.lang.NullPointerException
	at org.elasticsearch.action.search.SearchProgressListener.searchShards(SearchProgressListener.java:166)
	at org.elasticsearch.action.search.SearchPhaseController$QueryPhaseResultConsumer.consumeInternal(SearchPhaseController.java:639)
	at org.elasticsearch.action.search.SearchPhaseController$QueryPhaseResultConsumer.consumeResult(SearchPhaseController.java:617)
	at org.elasticsearch.action.search.CountedCollector.onResult(CountedCollector.java:62)
	at org.elasticsearch.action.search.DfsQueryPhase$1.innerOnResponse(DfsQueryPhase.java:89)
	... 24 more

This seems be related with PR #49471, @jimczi any ideas?

@iverase
Copy link
Contributor

iverase commented Dec 4, 2019

I think the error come from this call:

progressListener.notifyPartialReduce(progressListener.searchShards(results.asList()),

This is a bit out my depth but the method is synchronised but the result that is given to the method seems to be shared across threads so I wonder if this is a concurrency issue.

jimczi added a commit to jimczi/elasticsearch that referenced this issue Dec 4, 2019
The list used by the search progress listener can be nullified
by another thread that reports a query result. This change replaces
the usage of this list with a new array that is synchronously modified.

Closes elastic#49778
jimczi added a commit that referenced this issue Dec 4, 2019
The list used by the search progress listener can be nullified
by another thread that reports a query result. This change replaces
the usage of this list with a new array that is synchronously modified.

Closes #49778
jimczi added a commit that referenced this issue Dec 5, 2019
The list used by the search progress listener can be nullified
by another thread that reports a query result. This change replaces
the usage of this list with a new array that is synchronously modified.

Closes #49778
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this issue Jan 23, 2020
The list used by the search progress listener can be nullified
by another thread that reports a query result. This change replaces
the usage of this list with a new array that is synchronously modified.

Closes elastic#49778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI
Projects
None yet
3 participants