[
https://issues.apache.org/jira/browse/HIVE-21033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16729749#comment-16729749
]
Hive QA commented on HIVE-21033:
--------------------------------
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12953155/HIVE-21033.5.patch
{color:green}SUCCESS:{color} +1 due to 6 test(s) being added or modified.
{color:green}SUCCESS:{color} +1 due to 15759 tests passed
Test results:
https://builds.apache.org/job/PreCommit-HIVE-Build/15440/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/15440/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-15440/
Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}
This message is automatically generated.
ATTACHMENT ID: 12953155 - PreCommit-HIVE-Build
> Forgetting to close operation cuts off any more HiveServer2 output
> ------------------------------------------------------------------
>
> Key: HIVE-21033
> URL: https://issues.apache.org/jira/browse/HIVE-21033
> Project: Hive
> Issue Type: Bug
> Reporter: Szehon Ho
> Assignee: Szehon Ho
> Priority: Major
> Attachments: HIVE-21033.2.patch, HIVE-21033.3.patch,
> HIVE-21033.4.patch, HIVE-21033.5.patch, HIVE-21033.patch
>
>
> We had a custom client that did not handle closing the operations, until the
> end of the session. it is a mistake in the client, but it reveals kind of a
> vulnerability in HiveServer2
> This happens if you have a session with (1) HiveCommandOperation and (2)
> SQLOperation and don't close them right after. For example a session that
> does the operations (set a=b; select * from foobar; ).
> When SQLOperation runs , it set SessionState.out and err to be System.out and
> System.err . Ref:
> [SQLOperation#setupSessionIO|https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L139]
> Then the client closes the session, or disconnects which triggers
> closeSession() on the Thrift side. In this case, the closeSession closes all
> the operations, starting with HiveCommandOperation. This closes all the
> streams, which is System.out and System.err as set by SQLOperation earlier.
> Ref:
> [HiveCommandOperation#tearDownSessionIO|https://github.com/apache/hive/blob/f37c5de6c32b9395d1b34fa3c02ed06d1bfbf6eb/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java#L101]
>
> After this, no more HiveServer2 output appears as System.out and System.err
> are closed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)