You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "xiepengjie (Jira)" <ji...@apache.org> on 2021/11/01 05:40:00 UTC
[jira] [Comment Edited] (HIVE-11819) HiveServer2 catches OOMs on
request threads
[ https://issues.apache.org/jira/browse/HIVE-11819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436617#comment-17436617 ]
xiepengjie edited comment on HIVE-11819 at 11/1/21, 5:39 AM:
-------------------------------------------------------------
The report method in FutureTask wrapped all EXCEPTIONAL(value is 3) state as ExecutionException.
{code:java}
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED)
throw new CancellationException();
throw new ExecutionException((Throwable)x);
}
{code}
So, such as the below code in the methed org.jeff.juc.ThreadPoolExecutorWithOomHook#afterExecute
{code:java}
if (t instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
this shouldn't happen.
We can fix it like this,
{code:java}
if (t instanceof OutOfMemoryError || t.getCause() instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
otherwise the current fix will be invalided.
[~sershe] [~vgumashta] ,can you take a look?
was (Author: xiepengjie):
The report method in FutureTask wrapped all EXCEPTIONAL(value is 3) state as ExecutionException.
{code:java}
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED)
throw new CancellationException();
throw new ExecutionException((Throwable)x);
}
{code}
So, such as the below code in the methed org.jeff.juc.ThreadPoolExecutorWithOomHook#afterExecute
{code:java}
if (t instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
this shouldn't happen.
We can fix it like this,
{code:java}
if (t instanceof OutOfMemoryError || t.getCause() instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
otherwise this fix will be invalided.
[~sershe] [~vgumashta] ,can you take a look?
> HiveServer2 catches OOMs on request threads
> -------------------------------------------
>
> Key: HIVE-11819
> URL: https://issues.apache.org/jira/browse/HIVE-11819
> Project: Hive
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: HIVE-11819.01.patch, HIVE-11819.02.patch, HIVE-11819.patch
>
>
> ThriftCLIService methods such as ExecuteStatement are apparently capable of catching OOMs because they get wrapped in RTE by HiveSessionProxy.
> This shouldn't happen.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)