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] MultiMatchQueryBuilderTests#testToQuery fails #36598

Closed
albertzaharovits opened this issue Dec 13, 2018 · 9 comments
Closed

[CI] MultiMatchQueryBuilderTests#testToQuery fails #36598

albertzaharovits opened this issue Dec 13, 2018 · 9 comments
Assignees
Labels
:Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test-failure Triaged test failures from CI

Comments

@albertzaharovits
Copy link
Contributor

Fails without reproduction in 6.x
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+intake/602/console

./gradlew :server:test \
  -Dtests.seed=A69F97632943C0AB \
  -Dtests.class=org.elasticsearch.index.query.MultiMatchQueryBuilderTests \
  -Dtests.method="testToQuery" \
  -Dtests.security.manager=true \
  -Dtests.locale=it-IT \
  -Dtests.timezone=Turkey \
  -Dcompiler.java=11 \
  -Druntime.java=8
NOTE: test params are: codec=Asserting(Lucene70): {}, docValues:{}, maxPointsInLeafNode=438, maxMBSortInHeap=5.807871383458673, sim=RandomSimilarity(queryNorm=false): {}, locale=it-IT, timezone=Turkey
10:12:24    > Throwable #1: ElasticsearchParseException[failed to parse date field [false] with format [strict_date_optional_time||epoch_millis]]; nested: ElasticsearchParseException[failed to parse date field [false] with format [strict_date_optional_time]]; nested: IllegalArgumentException[Parse failure at index [0] of [false]];
10:12:24    > 	at __randomizedtesting.SeedInfo.seed([A69F97632943C0AB:5164955D58C00541]:0)
10:12:24   2> NOTE: Linux 4.16.8-300.fc28.x86_64 amd64/Oracle Corporation 1.8.0_192 (64-bit)/cpus=16,threads=1,free=372045400,total=524812288
10:12:24    > 	at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1544)
10:12:24   2> dNoReplicasRoutingTests, SnapshotUtilsTests, InternalExtendedStatsBucketTests, DiskThresholdDeciderUnitTests, RestNodesStatsActionTests, OriginalIndicesTests, TemplateUpgradeServiceTests, ScriptDocValuesMissingV6BehaviourTests, TransportReplicationActionTests, UUIDTests, ReleasableBytesStreamOutputTests, MatchPhrasePrefixQueryBuilderTests, MaxRetryAllocationDeciderTests, BulkByScrollTaskStatusOrExceptionTests, ForceMergeResponseTests, RestHttpResponseHeadersTests, BalanceConfigurationTests, AbstractAsyncTaskTests, SignificantTermsAggregatorTests, GeoDistanceTests, ScriptQueryBuilderTests, InternalMedianAbsoluteDeviationTests, PersistentTasksExecutorResponseTests, XContentParserUtilsTests, MultiGetShardRequestTests, SuggestionOptionTests, NetworkAddressTests, ClusterStateTests, CircleBuilderTests, BlendedTermQueryTests, MergePolicySettingsTests, SingleNodeDiscoveryTests, GeoPointFieldTypeTests, RepositoriesServiceTests, InternalSettingsPreparerTests, JvmGcMonitorServiceSettingsTests, PolygonBuilderTests, SimulateDocumentVerboseResultTests, ClusterSearchShardsResponseTests, InternalGlobalTests, MultiValueModeTests, InternalHDRPercentilesRanksTests, GroupShardsIteratorTests, MedianAbsoluteDeviationTests, SettingsModuleTests, RefreshPolicyTests, LegacyUidFieldMapperTests, UpdateResponseTests, TransportBulkActionIndicesThatCannotBeCreatedTests, QueueRecyclerTests, GeoHashGridTests, BestDocsDeferringCollectorTests, DocumentFieldTests, IncludeExcludeTests, CompressibleBytesOutputStreamTests, ExponentiallyWeightedMovingAverageTests, FilterFieldDataTests, StupidBackoffModelTests, DiskThresholdSettingsTests, ClusterApplierServiceTests, ExplainResponseTests, CombineFunctionTests, SignificantTermsTests, NestedObjectMapperTests, DocumentMapperMergeTests, ESSolrSynonymParserTests, SubAggCollectionModeTests, AutoQueueAdjustingExecutorBuilderTests, ListKeyStoreCommandTests, DateMathExpressionResolverTests, ParentFieldTypeTests, IpFieldMapperTests, LocalCheckpointTrackerTests, ResourceWatcherServiceTests, GeoContextMappingTests, SearchRequestBuilderTests, MainResponseTests, BulkItemResponseTests, CodecTests, ClusterGetSettingsResponseTests, RestoreSnapshotResponseTests, SnapshotIndexStatusTests, SnapshotStatsTests, GetStoredScriptResponseTests, PutStoredScriptRequestTests, TransportAnalyzeActionTests, GetAliasesResponseTests, TransportRolloverActionTests, GetSettingsRequestTests, ResizeRequestTests, TransportResizeActionTests, ApplierServiceTests, ExplainResponseTests, CombineFunctionTests, SignificantTermsTests, NestedObjectMapperTests, DocumentMapperMergeTests, ESSolrSynonymParserTests, SubAggCollectionModeTests, AutoQueueAdjustingExecutorBuilderTests, ListKeyStoreCommandTests, DateMathExpressionResolverTests, ParentFieldTypeTests, IpFieldMapperTests, LocalCheckpointTrackerTests, ResourceWatcherServiceTests, GeoContextMappingTests, SearchRequestBuilderTests, MainResponseTests, BulkItemResponseTests, CodecTests, ClusterGetSettingsResponseTests, RestoreSnapshotResponseTests, SnapshotIndexStatusTests, SnapshotStatsTests, GetStoredScriptResponseTests, PutStoredScriptRequestTests, TransportAnalyzeActionTests, GetAliasesResponseTests, TransportRolloverActionTests, GetSettingsRequestTests, ResizeRequestTests, TransportResizeActionTests, FieldCapabilitiesRequestTests, FieldCapabilitiesTests, SimulateExecutionServiceTests, ClearScrollControllerTests, CountedCollectorTests, ParentTaskAssigningClientTests, TransportClientNodesServiceTests, NodeEnvironmentTests, VersionTypeTests, HunspellTokenFilterFactoryTests, BooleanFieldMapperTests, FieldNamesFieldMapperTests, KeywordFieldMapperTests, UidFieldTypeTests, UpdateMappingTests, MultiMatchQueryBuilderTests]
10:12:24    > 	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.parseToMilliseconds(DateFieldMapper.java:317)
10:12:24    > 	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.rangeQuery(DateFieldMapper.java:283)
10:12:24    > 	at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.termQuery(DateFieldMapper.java:261)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.blendTerms(MultiMatchQuery.java:270)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.blendTerm(MultiMatchQuery.java:257)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery$CrossFieldsQueryBuilder.blendTerm(MultiMatchQuery.java:230)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.blendTermQuery(MultiMatchQuery.java:349)
10:12:24    > 	at org.elasticsearch.index.search.MatchQuery.parse(MatchQuery.java:269)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.parseAndApply(MultiMatchQuery.java:61)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.access$100(MultiMatchQuery.java:47)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery$QueryBuilder.parseGroup(MultiMatchQuery.java:126)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery$CrossFieldsQueryBuilder.buildGroupedQueries(MultiMatchQuery.java:204)
10:12:24    > 	at org.elasticsearch.index.search.MultiMatchQuery.parse(MultiMatchQuery.java:94)
10:12:24    > 	at org.elasticsearch.index.query.MultiMatchQueryBuilder.doToQuery(MultiMatchQueryBuilder.java:824)
10:12:24    > 	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:104)
10:12:24    > 	at org.elasticsearch.test.AbstractQueryTestCase.testToQuery(AbstractQueryTestCase.java:428)
10:12:24    > 	at java.lang.Thread.run(Thread.java:748)
10:12:24    > 	Suppressed: ElasticsearchParseException[failed to parse date field [false] with format [epoch_millis]]; nested: IllegalArgumentException[Parse failure at index [0] of [false]];
10:12:24    > 		at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:215)
10:12:24    > 		at org.elasticsearch.common.joda.JodaDateMathParser.parse(JodaDateMathParser.java:67)
10:12:24    > 		at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1540)
10:12:24    > 		... 53 more
10:12:24    > 	Caused by: java.lang.IllegalArgumentException: Parse failure at index [0] of [false]
10:12:24    > 		at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:208)
10:12:24    > 		... 55 more
10:12:24    > Caused by: ElasticsearchParseException[failed to parse date field [false] with format [strict_date_optional_time]]; nested: IllegalArgumentException[Parse failure at index [0] of [false]];
10:12:24    > 	at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:215)
10:12:24    > 	at org.elasticsearch.common.joda.JodaDateMathParser.parse(JodaDateMathParser.java:67)
10:12:24    > 	at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1540)
10:12:24    > 	... 53 more
10:12:24    > Caused by: java.lang.IllegalArgumentException: Parse failure at index [0] of [false]
10:12:24    > 	at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:208)
10:12:24    > 	... 55 more
@albertzaharovits albertzaharovits added :Search Foundations/Mapping Index mappings, including merging and defining field types >test-failure Triaged test failures from CI labels Dec 13, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@albertzaharovits
Copy link
Contributor Author

Looks like this has been fixed since ec0036b and 971a707 (that had the failures).
Closing, sorry for the noise.

@imotov
Copy link
Contributor

imotov commented Dec 13, 2018

That just reproducibly failed for me on 6.x with

./gradlew :server:test -Dtests.seed=F8CECC92C3103FA6 -Dtests.class=org.elasticsearch.index.query.MultiMatchQueryBuilderTests -Dtests.method="testMustRewrite" -Dtests.security.manager=true -Dtests.jvms=4 -Dtests.locale=ar-JO -Dtests.timezone=EST5EDT -Dcompiler.java=11 -Druntime.java=11

So, I don't think it is fixed (at least in 6.x)

@imotov imotov reopened this Dec 13, 2018
@spinscale
Copy link
Contributor

spinscale commented Dec 13, 2018

I do find weird things when putting this test using @Repeat in the test class, sometimes I get the above error message, but I also got (happens on master as well)

java.lang.NumberFormatException: For input string: "hello"

	at __randomizedtesting.SeedInfo.seed([D7A075C2C79DDB22:C3A2C5854E85F27]:0)
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.base/java.lang.Double.parseDouble(Double.java:543)
	at org.elasticsearch.index.mapper.NumberFieldMapper$NumberType.hasDecimalPart(NumberFieldMapper.java:846)
	at org.elasticsearch.index.mapper.NumberFieldMapper$NumberType$6.termQuery(NumberFieldMapper.java:599)
	at org.elasticsearch.index.mapper.NumberFieldMapper$NumberFieldType.termQuery(NumberFieldMapper.java:922)
	at org.elasticsearch.index.search.MatchQuery.termQuery(MatchQuery.java:303)
	at org.elasticsearch.index.search.MatchQuery.blendTermQuery(MatchQuery.java:535)
	at org.elasticsearch.index.search.MultiMatchQuery.access$201(MultiMatchQuery.java:48)
	at org.elasticsearch.index.search.MultiMatchQuery$QueryBuilder.blendTerm(MultiMatchQuery.java:145)
	at org.elasticsearch.index.search.MultiMatchQuery.blendTermQuery(MultiMatchQuery.java:343)
	at org.elasticsearch.index.search.MatchQuery.parse(MatchQuery.java:264)
	at org.elasticsearch.index.search.MultiMatchQuery.parseAndApply(MultiMatchQuery.java:62)
	at org.elasticsearch.index.search.MultiMatchQuery.access$100(MultiMatchQuery.java:48)
	at org.elasticsearch.index.search.MultiMatchQuery$QueryBuilder.parseGroup(MultiMatchQuery.java:127)
	at org.elasticsearch.index.search.MultiMatchQuery$QueryBuilder.buildGroupedQueries(MultiMatchQuery.java:115)
	at org.elasticsearch.index.search.MultiMatchQuery.parse(MultiMatchQuery.java:95)
	at org.elasticsearch.index.query.MultiMatchQueryBuilder.doToQuery(MultiMatchQueryBuilder.java:825)
	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:98)
	at org.elasticsearch.index.query.MultiMatchQueryBuilderTests.testDefaultField(MultiMatchQueryBuilderTests.java:353)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I have not yet determined if this there is state somewhere in test or the run order of tests, that may be an issue

@spinscale
Copy link
Contributor

I think this is the offending code, which only exists in 6.x, but not in master https://github.com/elastic/elasticsearch/blob/6.x/server/src/main/java/org/elasticsearch/index/search/MultiMatchQuery.java#L277-L283

spinscale added a commit to spinscale/elasticsearch that referenced this issue Dec 13, 2018
Due to the change in exception handling in elastic#36447 the backport now used
different exceptions on parser failures between java and joda time
formatting. This uses now IllegalArgumentExceptions for formatting
errors all over the place.

Closes elastic#36598
@gwbrown
Copy link
Contributor

gwbrown commented Dec 15, 2018

This fails reproducibly on current 6.x for me with

./gradlew :server:test -Dtests.seed=D16EE929C3DB3AEB -Dtests.class=org.elasticsearch.index.query.MultiMatchQueryBuilderTests -Dtests.method="testToQuery" -Dtests.security.manager=true -Dtests.locale=it-CH -Dtests.timezone=Asia/Jakarta -Dcompiler.java=11 -Druntime.java=8

pgomulka added a commit that referenced this issue Dec 17, 2018
issue referencing the problem: #36598
@pgomulka
Copy link
Contributor

Failing on 6.x with testMustRewrite. It looks like @spinscale 's PR won't fix this one

./gradlew :server:test \                             
  -Dtests.seed=7704427605772256 \
  -Dtests.class=org.elasticsearch.index.query.MultiMatchQueryBuilderTests \
  -Dtests.method="testMustRewrite" \
  -Dtests.security.manager=true \
  -Dtests.locale=sr-Latn-ME \
  -Dtests.timezone=America/Chihuahua \
  -Dcompiler.java=11 \
  -Druntime.java=8
ERROR   2.41s | MultiMatchQueryBuilderTests.testMustRewrite <<< FAILURES!
   > Throwable #1: ElasticsearchParseException[failed to parse date field [LmzQeGPTQO] with format [strict_date_optional_time||epoch_millis]]; nested: ElasticsearchParseException[failed to parse date field [LmzQeGPTQO] with format [strict_date_optional_time]]; nested: IllegalArgumentException[Parse failure at index [0] of [LmzQeGPTQO]];
   >    at __randomizedtesting.SeedInfo.seed([7704427605772256:C3EB314B7D2024D6]:0)
   >    at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1544)
   >    at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.parseToMilliseconds(DateFieldMapper.java:317)
   >    at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.rangeQuery(DateFieldMapper.java:283)
   >    at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.termQuery(DateFieldMapper.java:261)
   >    at org.elasticsearch.index.search.MultiMatchQuery.blendTerms(MultiMatchQuery.java:270)
   >    at org.elasticsearch.index.search.MultiMatchQuery.blendTerm(MultiMatchQuery.java:257)
   >    at org.elasticsearch.index.search.MultiMatchQuery$CrossFieldsQueryBuilder.blendTerm(MultiMatchQuery.java:230)
   >    at org.elasticsearch.index.search.MultiMatchQuery.blendTermQuery(MultiMatchQuery.java:349)
   >    at org.elasticsearch.index.search.MatchQuery.parse(MatchQuery.java:269)
   >    at org.elasticsearch.index.search.MultiMatchQuery.parseAndApply(MultiMatchQuery.java:61)
   >    at org.elasticsearch.index.search.MultiMatchQuery.access$100(MultiMatchQuery.java:47)
   >    at org.elasticsearch.index.search.MultiMatchQuery$QueryBuilder.parseGroup(MultiMatchQuery.java:126)
   >    at org.elasticsearch.index.search.MultiMatchQuery$CrossFieldsQueryBuilder.buildGroupedQueries(MultiMatchQuery.java:204)
   >    at org.elasticsearch.index.search.MultiMatchQuery.parse(MultiMatchQuery.java:94)
   >    at org.elasticsearch.index.query.MultiMatchQueryBuilder.doToQuery(MultiMatchQueryBuilder.java:824)
   >    at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:104)
   >    at org.elasticsearch.test.AbstractQueryTestCase.testMustRewrite(AbstractQueryTestCase.java:804)
   >    at java.lang.Thread.run(Thread.java:748)
   >    Suppressed: ElasticsearchParseException[failed to parse date field [LmzQeGPTQO] with format [epoch_millis]]; nested: IllegalArgumentException[Parse failure at index [0] of [LmzQeGPTQO]];
   >            at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:215)
   >            at org.elasticsearch.common.joda.JodaDateMathParser.parse(JodaDateMathParser.java:67)
   >            at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1540)
   >            ... 53 more
   >    Caused by: java.lang.IllegalArgumentException: Parse failure at index [0] of [LmzQeGPTQO]
   >            at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:208)
   >            ... 55 more
   > Caused by: ElasticsearchParseException[failed to parse date field [LmzQeGPTQO] with format [strict_date_optional_time]]; nested: IllegalArgumentException[Parse failure at index [0] of [LmzQeGPTQO]];
   >    at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:215)
   >    at org.elasticsearch.common.joda.JodaDateMathParser.parse(JodaDateMathParser.java:67)
   >    at org.elasticsearch.common.time.DateFormatters$MergedDateFormatter.lambda$toDateMathParser$2(DateFormatters.java:1540)
   >    ... 53 more
   > Caused by: java.lang.IllegalArgumentException: Parse failure at index [0] of [LmzQeGPTQO]
   >    at org.elasticsearch.common.joda.JodaDateMathParser.parseDateTime(JodaDateMathParser.java:208)
   >    ... 55 more

pgomulka added a commit to pgomulka/elasticsearch that referenced this issue Dec 17, 2018
only muting two failing test cases in a subclass where they fail.
issue referencing the problem: elastic#36598
pgomulka added a commit that referenced this issue Dec 17, 2018
only muting two failing test cases in a subclass where they fail.
issue referencing the problem: #36598
@mayya-sharipova mayya-sharipova self-assigned this Dec 17, 2018
@mayya-sharipova
Copy link
Contributor

@spinscale Alex, I have created a fix for this test: #36742. The fix also workswith your PR #36604

@mayya-sharipova
Copy link
Contributor

This was addressed in #36742

@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

8 participants