You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "chenruotao (via GitHub)" <gi...@apache.org> on 2023/11/07 02:47:10 UTC

[PR] HIVE-27854:Driver compile may causing memory leak, it should not comp… [hive]

chenruotao opened a new pull request, #4856:
URL: https://github.com/apache/hive/pull/4856

   HIVE-27854:Driver compile may causing memory leak
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   I describe it in this the issuse 
   https://issues.apache.org/jira/browse/HIVE-27854
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   I describe it in this the issuse 
   https://issues.apache.org/jira/browse/HIVE-27854
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### Is the change a dependency upgrade?
   <!--
   If yes, please attach a file with output from mvn dependency:tree to validate a complete upgrade of dependency.
   If no, write 'No'.
   -->
   No
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   I describe it in this the issuse 
   https://issues.apache.org/jira/browse/HIVE-27854
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "chenruotao (via GitHub)" <gi...@apache.org>.
chenruotao commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1801509860

   > I would merge this PR with #4854 Both PR are belong to the same issue. Does not need 2 PR for this.
   > 
   > Btw is this resolved on master?
   
   sorry for 2 PR, because the related code in master  has a difference from brance 3.1.2, so I submit 2 PR, one for brance 3.1, one for master.  And I think there is the same problem on master, but it can not return directly, i set abort.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "aturoczy (via GitHub)" <gi...@apache.org>.
aturoczy commented on code in PR #4856:
URL: https://github.com/apache/hive/pull/4856#discussion_r1386291771


##########
ql/src/java/org/apache/hadoop/hive/ql/Driver.java:
##########
@@ -508,6 +508,10 @@ private void compile(String command, boolean resetTaskIds, boolean deferClose) t
     perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.COMPILE);
     lDrvState.stateLock.lock();
     try {
+      if (lDrvState.driverState == DriverState.DESTROYED || lDrvState.driverState == DriverState.CLOSED) {
+        LOG.warn("FAILED: Query command could not be compiled because driver has been cancelled, closed or destroyed.");

Review Comment:
   Maybe better:
   _Query compilation failed as the driver was canceled, closed, or destroyed_ 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "chenruotao (via GitHub)" <gi...@apache.org>.
chenruotao commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1801540137

   > > > I would merge this PR with #4854 Both PR are belong to the same issue. Does not need 2 PR for this.
   > > > Btw is this resolved on master?
   > > 
   > > 
   > > sorry for 2 PR, because the related code in master has a difference from brance 3.1.2, so I submit 2 PR, one for brance 3.1, one for master. And I think there is the same problem on master, but it can not return directly, so i set abort.
   > 
   > Please check on master. It would be better to have this PR on master, and we after that backport to 3.1. It could be a valuable change for all version
   
   ok, I will do update on https://github.com/apache/hive/pull/4854 later, that is on master, please take a review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1915814591

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "chenruotao (via GitHub)" <gi...@apache.org>.
chenruotao commented on code in PR #4856:
URL: https://github.com/apache/hive/pull/4856#discussion_r1386320870


##########
ql/src/java/org/apache/hadoop/hive/ql/Driver.java:
##########
@@ -508,6 +508,10 @@ private void compile(String command, boolean resetTaskIds, boolean deferClose) t
     perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.COMPILE);
     lDrvState.stateLock.lock();
     try {
+      if (lDrvState.driverState == DriverState.DESTROYED || lDrvState.driverState == DriverState.CLOSED) {
+        LOG.warn("FAILED: Query command could not be compiled because driver has been cancelled, closed or destroyed.");

Review Comment:
   But there is no driverState named canceled, i think the closed of driverStates include canceled



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "aturoczy (via GitHub)" <gi...@apache.org>.
aturoczy commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1801516099

   > > I would merge this PR with #4854 Both PR are belong to the same issue. Does not need 2 PR for this.
   > > Btw is this resolved on master?
   > 
   > sorry for 2 PR, because the related code in master has a difference from brance 3.1.2, so I submit 2 PR, one for brance 3.1, one for master. And I think there is the same problem on master, but it can not return directly, so i set abort.
   
   Please check on master. It would be better to have this PR on master, and we after that backport to 3.1. It could be a valuable change for all version


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "aturoczy (via GitHub)" <gi...@apache.org>.
aturoczy commented on code in PR #4856:
URL: https://github.com/apache/hive/pull/4856#discussion_r1386324348


##########
ql/src/java/org/apache/hadoop/hive/ql/Driver.java:
##########
@@ -508,6 +508,10 @@ private void compile(String command, boolean resetTaskIds, boolean deferClose) t
     perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.COMPILE);
     lDrvState.stateLock.lock();
     try {
+      if (lDrvState.driverState == DriverState.DESTROYED || lDrvState.driverState == DriverState.CLOSED) {
+        LOG.warn("FAILED: Query command could not be compiled because driver has been cancelled, closed or destroyed.");

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "chenruotao (via GitHub)" <gi...@apache.org>.
chenruotao commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1833716389

   > @chenruotao, can we close this PR as it has a duplicate?
   
   OK, if it doesn't need to be fixed in version 3.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4856: HIVE-27854:Driver compile may causing memory leak
URL: https://github.com/apache/hive/pull/4856


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1833705149

   @chenruotao, can we close this PR as it has a duplicate?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-27854:Driver compile may causing memory leak [hive]

Posted by "aturoczy (via GitHub)" <gi...@apache.org>.
aturoczy commented on PR #4856:
URL: https://github.com/apache/hive/pull/4856#issuecomment-1801543417

   Sure! Please ping me on that PR 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org