[ https://issues.apache.org/jira/browse/HIVE-20591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahesh Raju Somalaraju resolved HIVE-20591. ------------------------------------------- Fix Version/s: NA Resolution: Incomplete This issue i tried to reproduce as per steps given above and not faced any issue. This may be taken care in later versions as this Jira raised long back. [~Rajkumar Singh] Can you please try from your end and provide more details on this so that we can work and close this jira. This Jira we can close as of now and raise a new one if still issue present in latest versions of hive. thank you ! > hive query hung during compilation if same previous query is unable to > invalidate the QueryResultsCache entry > -------------------------------------------------------------------------------------------------------------- > > Key: HIVE-20591 > URL: https://issues.apache.org/jira/browse/HIVE-20591 > Project: Hive > Issue Type: Bug > Components: HiveServer2 > Affects Versions: 3.0.0 > Environment: Hive-3,java-8 > Reporter: Rajkumar Singh > Priority: Major > Fix For: NA > > > I believe this is the sequence of event to reproduce this issue. > 1. query failed with some env issue while setting up the Tez session. > 2. hiveserver2 tries do query cleanup, it invokes queryresultscache cleanup. > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java#L235 > 3. for some reason eighter following 2 event never happen and query falls > into the endless loop of checking the valid status. > i: unable to set the invalid status and return the old status > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java#L260 > ii: or this condition never reached. > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java#L245 > I don't have complete jstack so its tough to say who is waiting on what, the > stuck thread stack snipped look like > {code} > java.lang.Thread.State: TIMED_WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > at > org.apache.hadoop.hive.ql.cache.results.QueryResultsCache$CacheEntry.waitForValidStatus(QueryResultsCache.java:325) > - locked <0x00000000b32661c0> (a > org.apache.hadoop.hive.ql.cache.results.QueryResultsCache$CacheEntry) > at > org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:14860) > at > org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12200) > {code} > > will add more details after reproducing the issue again. -- This message was sent by Atlassian Jira (v8.20.10#820010)