[ 
https://issues.apache.org/jira/browse/HIVE-21190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

kongxianghe updated HIVE-21190:
-------------------------------
    Description: 
# cause by an error UDF function!time_waiting(Long sleepSeconds)
{code}
public class UDFTimeWaiting extends UDF throws Exception{
  public String evaluate(Long sleepSeconds){
     ...
     Thread.sleep(Long.parseLong(sleepSeconds) * 1000);
     return "ok";
 }
}
{code}

----

# in session_1:
{code}select time_waiting(100);{code}
# in session_2:
{code}select 1;  or show tables;{code}
# session_2 will not have any response from thrift server util  session_1  
waiting 100 seconds!

this bug may cause hiveserver come into an available status!  
----
# session_1 run waiting 200s,
 !session_1.jpg! 
# session_2 run at the same time ,but blocked by session_1 , see the 
pic,waiting 197s after session_1 returned then returned
 !session_2.jpg! 
----
if someone want to attack or do sth ,hiveserver will not be down,but not 
available again!


  was:
# cause by an error UDF function!time_waiting(Long sleepSeconds)
{code}
public class UDFTimeWaiting extends UDF throws Exception{
  public String evaluate(Long sleepSeconds){
     ...
     Thread.sleep(Long.parseLong(sleepSeconds) * 1000);
     return "ok";
 }
}
{code}

----

# in session_1:
{code}select time_waiting(100);{code}
# in session_2:
{code}select 1;  or show tables;{code}
# session_2 will not have any response from thrift server util  session_1  
waiting 100 seconds!

this bug may cause hiveserver come into an available status!  
===========================================================================================
# session_1 run waiting 200s,
 !session_1.jpg! 
# session_2 run at the same time ,but blocked by session_1 , see the 
pic,waiting 197s after session_1 returned then returned
 !session_2.jpg! 

===========================================================================================
if someone want to attack or do sth ,hiveserver will not be down,but not 
available again!



> hive thrift server may be blocked by session level waiting,caused by udf!
> -------------------------------------------------------------------------
>
>                 Key: HIVE-21190
>                 URL: https://issues.apache.org/jira/browse/HIVE-21190
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>         Environment: hdp ambari 26
> hive1.2.0
>            Reporter: kongxianghe
>            Assignee: Josh Elser
>            Priority: Critical
>         Attachments: session_1.jpg, session_2.jpg
>
>
> # cause by an error UDF function!time_waiting(Long sleepSeconds)
> {code}
> public class UDFTimeWaiting extends UDF throws Exception{
>   public String evaluate(Long sleepSeconds){
>      ...
>      Thread.sleep(Long.parseLong(sleepSeconds) * 1000);
>      return "ok";
>  }
> }
> {code}
> ----
> # in session_1:
> {code}select time_waiting(100);{code}
> # in session_2:
> {code}select 1;  or show tables;{code}
> # session_2 will not have any response from thrift server util  session_1  
> waiting 100 seconds!
> this bug may cause hiveserver come into an available status!  
> ----
> # session_1 run waiting 200s,
>  !session_1.jpg! 
> # session_2 run at the same time ,but blocked by session_1 , see the 
> pic,waiting 197s after session_1 returned then returned
>  !session_2.jpg! 
> ----
> if someone want to attack or do sth ,hiveserver will not be down,but not 
> available again!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to