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

TestHiveViews.testRichSqlSyntax is flaky when executing control query on Hive #7535

Closed
kokosing opened this issue Apr 9, 2021 · 10 comments · Fixed by #16707
Closed

TestHiveViews.testRichSqlSyntax is flaky when executing control query on Hive #7535

kokosing opened this issue Apr 9, 2021 · 10 comments · Fixed by #16707
Labels
bug Something isn't working test

Comments

@kokosing
Copy link
Member

kokosing commented Apr 9, 2021

2021-04-01T13:13:33.1762300Z tests               | 2021-04-01 18:58:33 INFO: FAILURE     /    io.trino.tests.hive.TestHiveViews.testRichSqlSyntax (Groups: hive_views) took 4.2 seconds
2021-04-01T13:13:33.1777680Z tests               | 2021-04-01 18:58:33 SEVERE: Failure cause:
2021-04-01T13:13:33.1779768Z tests               | io.trino.tempto.query.QueryExecutionException: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
2021-04-01T13:13:33.1782535Z tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:119)
2021-04-01T13:13:33.1784547Z tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQuery(JdbcQueryExecutor.java:84)
2021-04-01T13:13:33.1786836Z tests               | 	at io.trino.tests.hive.AbstractTestHiveViews.assertViewQuery(AbstractTestHiveViews.java:349)
2021-04-01T13:13:33.1789378Z tests               | 	at io.trino.tests.hive.AbstractTestHiveViews.testRichSqlSyntax(AbstractTestHiveViews.java:192)
2021-04-01T13:13:33.1792043Z tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-04-01T13:13:33.1794578Z tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-04-01T13:13:33.1797385Z tests               | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-04-01T13:13:33.1799473Z tests               | 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-04-01T13:13:33.1801412Z tests               | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
2021-04-01T13:13:33.1803430Z tests               | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
2021-04-01T13:13:33.1805000Z tests               | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
2021-04-01T13:13:33.1806750Z tests               | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
2021-04-01T13:13:33.1808817Z tests               | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
2021-04-01T13:13:33.1810866Z tests               | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
2021-04-01T13:13:33.1812835Z tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2021-04-01T13:13:33.1814918Z tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2021-04-01T13:13:33.1816291Z tests               | 	at java.base/java.lang.Thread.run(Thread.java:834)
2021-04-01T13:13:33.1817918Z tests               | Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
2021-04-01T13:13:33.1820240Z tests               | 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:275)
2021-04-01T13:13:33.1822458Z tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:128)
2021-04-01T13:13:33.1824862Z tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:112)
2021-04-01T13:13:33.1826047Z tests               | 	... 16 more
2021-04-01T13:13:33.1827513Z tests               | 	Suppressed: java.lang.Exception: Query: SELECT   n_nationkey, n_name, region_between_1_2, starts_with_a, not_peru, contains_n, is_something, coalesced_name,   rounded_tan, the_orderdate, arithmetic FROM view_with_rich_syntax WHERE n_regionkey < 3 AND (n_nationkey < 5 OR n_nationkey IN (12, 17))
2021-04-01T13:13:33.1830121Z tests               | 		at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:136)
2021-04-01T13:13:33.1831716Z tests               | 		... 17 more
2021-04-01T13:13:33.1832097Z tests               | 
2021-04-01T13:13:33.1881331Z tests               | 2021-04-01 18:58:33 INFO: [371 of 567] io.trino.tests.hive.TestHiveViews.testSelectFromHiveViewWithoutDefaultCatalogAndSchema (Groups: )
@findepi
Copy link
Member

findepi commented Apr 9, 2021

@findepi findepi changed the title TestHiveViews.testRichSqlSyntax is flaky TestHiveViews.testRichSqlSyntax is flaky when executing control query on Hive Apr 9, 2021
@findepi
Copy link
Member

findepi commented Apr 13, 2021

https://github.com/trinodb/trino/runs/2333074873 with CDH5.

@kokosing did you originally observe this with CDH5 as well?

@kokosing
Copy link
Member Author

Not sure.

@findepi
Copy link
Member

findepi commented Apr 14, 2021

io.trino.tests.hive.TestHiveViews.testRichSqlSyntax passed 100 times on CDH5 locally for me.
but it's far less green @ #7592. seems like memory pressure related?

@findepi
Copy link
Member

findepi commented Apr 16, 2021

In a stress test #7592 cdh5 suite-1 failed 20 of 50 runs.
TestHiveViews.testRichSqlSyntax failure was in every from first 6 failures i checked. I did not check remaining 14 failures.

@findepi
Copy link
Member

findepi commented Oct 12, 2021

Supposedly fixed by #9595. Please reopen this (or maybe #9472) if seen again.
cc @homar

@findepi findepi closed this as completed Oct 12, 2021
@findinpath
Copy link
Contributor

#15470 (comment)

2022-12-22 11:04:50 INFO: [303 of 478] io.trino.tests.product.hive.TestHiveViews.testRichSqlSyntax (Groups: hive_views)
tests               | 2022-12-22 11:04:51 WARNING: not retrying; stacktrace 'io.trino.tempto.query.QueryExecutionException: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching map.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:119)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQuery(JdbcQueryExecutor.java:84)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.assertViewQuery(AbstractTestHiveViews.java:761)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.testRichSqlSyntax(AbstractTestHiveViews.java:340)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
tests               | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
tests               | 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
tests               | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
tests               | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
tests               | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
tests               | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
tests               | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
tests               | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
tests               | 	at java.base/java.lang.Thread.run(Thread.java:833)
tests               | Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching map.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:275)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:128)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:112)
tests               | 	... 16 more
tests               | 	Suppressed: java.lang.Exception: Query: SELECT   n_nationkey, n_name, region_between_1_2, starts_with_a, not_peru, contains_n, is_something, coalesced_name,   rounded_tan, the_orderdate, arithmetic FROM view_with_rich_syntax WHERE n_regionkey < 3 AND (n_nationkey < 5 OR n_nationkey IN (12, 17))

@findepi
Copy link
Member

findepi commented Dec 23, 2022

@findinpath did you mean to reopen?

i did it for you.
since this is a flakiness on hive side, we should add some retry there

@findepi
Copy link
Member

findepi commented Mar 24, 2023

https://github.com/trinodb/trino/actions/runs/4500455604/jobs/7920731686?pr=16651

@Flaky retries weren't applied due to a pattern mismatch

tests               | 2023-03-23 21:40:23 INFO: [117 of 484] io.trino.tests.product.hive.TestHiveViews.testRichSqlSyntax (Groups: hive_views)
tests               | 2023-03-23 21:40:26 WARNING: not retrying; stacktrace does not match pattern 'FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask': [io.trino.tempto.query.QueryExecutionException: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching reduce.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:119)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQuery(JdbcQueryExecutor.java:84)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.assertViewQuery(AbstractTestHiveViews.java:753)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.testRichSqlSyntax(AbstractTestHiveViews.java:340)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
tests               | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
tests               | 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
tests               | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
tests               | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
tests               | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
tests               | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
tests               | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
tests               | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
tests               | 	at java.base/java.lang.Thread.run(Thread.java:833)
tests               | Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching reduce.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:275)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:128)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:112)
tests               | 	... 16 more
tests               | 	Suppressed: java.lang.Exception: Query: SELECT   n_nationkey, n_name, region_between_1_2, starts_with_a, not_peru, contains_n, is_something, coalesced_name,   rounded_tan, the_orderdate, arithmetic FROM view_with_rich_syntax WHERE n_regionkey < 3 AND (n_nationkey < 5 OR n_nationkey IN (12, 17))
tests               | 		at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:136)
tests               | 		... 17 more
tests               | ]
tests               | 2023-03-23 21:40:26 INFO: FAILURE     /    io.trino.tests.product.hive.TestHiveViews.testRichSqlSyntax (Groups: hive_views) took 2.5 seconds
tests               | 2023-03-23 21:40:26 SEVERE: Failure cause:
tests               | io.trino.tempto.query.QueryExecutionException: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching reduce.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:119)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQuery(JdbcQueryExecutor.java:84)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.assertViewQuery(AbstractTestHiveViews.java:753)
tests               | 	at io.trino.tests.product.hive.AbstractTestHiveViews.testRichSqlSyntax(AbstractTestHiveViews.java:340)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
tests               | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
tests               | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
tests               | 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
tests               | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
tests               | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
tests               | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
tests               | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
tests               | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
tests               | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
tests               | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
tests               | 	at java.base/java.lang.Thread.run(Thread.java:833)
tests               | Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Error caching reduce.xml: java.nio.channels.ClosedByInterruptException
tests               | 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:275)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:128)
tests               | 	at io.trino.tempto.query.JdbcQueryExecutor.execute(JdbcQueryExecutor.java:112)
tests               | 	... 16 more
tests               | 	Suppressed: java.lang.Exception: Query: SELECT   n_nationkey, n_name, region_between_1_2, starts_with_a, not_peru, contains_n, is_something, coalesced_name,   rounded_tan, the_orderdate, arithmetic FROM view_with_rich_syntax WHERE n_regionkey < 3 AND (n_nationkey < 5 OR n_nationkey IN (12, 17))
tests               | 		at io.trino.tempto.query.JdbcQueryExecutor.executeQueryNoParams(JdbcQueryExecutor.java:136)
tests               | 		... 17 more

@findepi
Copy link
Member

findepi commented Mar 24, 2023

Improving retry pattern in #16707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Development

Successfully merging a pull request may close this issue.

3 participants