Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1725

TaskContainer can hang when RuntimeException occurs in TaskImpl.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Worker
    • Labels:
      None

      Description

      TaskContainer can hang when RuntimeException occurs in TaskImpl. The reason is as follows:

      • TaskContainer can be aborted by Exception.
      • TaskImpl running in TaskContainer does not throw Throwable.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jinossy commented on the pull request:

          https://github.com/apache/tajo/pull/667#issuecomment-126596832

          @hyunsik
          TAJO-1726 is caused by rethrow the exception
          Thanks.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/667#issuecomment-126596832 @hyunsik TAJO-1726 is caused by rethrow the exception Thanks.
          Hide
          hyunsik Hyunsik Choi added a comment -

          Fixed in TAJO-1731.

          Show
          hyunsik Hyunsik Choi added a comment - Fixed in TAJO-1731 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik closed the pull request at:

          https://github.com/apache/tajo/pull/667

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik closed the pull request at: https://github.com/apache/tajo/pull/667
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/667#issuecomment-126579511

          This bug seems to be fixed in TAJO-1731. I close this issue. Thank you

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/667#issuecomment-126579511 This bug seems to be fixed in TAJO-1731 . I close this issue. Thank you
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jinossy commented on the pull request:

          https://github.com/apache/tajo/pull/667#issuecomment-126579289

          @hyunsik
          Query hang is fixed by TAJO-1731. Could you test again?

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/667#issuecomment-126579289 @hyunsik Query hang is fixed by TAJO-1731 . Could you test again?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jinossy commented on a diff in the pull request:

          https://github.com/apache/tajo/pull/667#discussion_r35937482

          — Diff: tajo-core/src/main/java/org/apache/tajo/worker/TaskContainer.java —
          @@ -66,7 +66,8 @@ public void run() {
          }

          task.cleanup();

          • } catch (Exception e) { + + }

            catch (Throwable e) {

              • End diff –

          Nice catch!!

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on a diff in the pull request: https://github.com/apache/tajo/pull/667#discussion_r35937482 — Diff: tajo-core/src/main/java/org/apache/tajo/worker/TaskContainer.java — @@ -66,7 +66,8 @@ public void run() { } task.cleanup(); } catch (Exception e) { + + } catch (Throwable e) { End diff – Nice catch!!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jinossy commented on a diff in the pull request:

          https://github.com/apache/tajo/pull/667#discussion_r35937479

          — Diff: tajo-core/src/main/java/org/apache/tajo/worker/TaskImpl.java —
          @@ -400,10 +401,14 @@ public void run() throws Exception {
          }
          }
          } catch (Throwable e) {
          + // clean up TaskImpl resource
          error = e ;

          • LOG.error(e.getMessage(), e);
            stopScriptExecutors();
            context.stop();
            +
            + // rethrow the exception in order to propagate the abnormal status to TaskContainer
            + throw new TajoInternalError(e);
              • End diff –

          If an exception causes in physical operator, it can be sent failure report in finally block. But rethrow the exception are sent report twice

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on a diff in the pull request: https://github.com/apache/tajo/pull/667#discussion_r35937479 — Diff: tajo-core/src/main/java/org/apache/tajo/worker/TaskImpl.java — @@ -400,10 +401,14 @@ public void run() throws Exception { } } } catch (Throwable e) { + // clean up TaskImpl resource error = e ; LOG.error(e.getMessage(), e); stopScriptExecutors(); context.stop(); + + // rethrow the exception in order to propagate the abnormal status to TaskContainer + throw new TajoInternalError(e); End diff – If an exception causes in physical operator, it can be sent failure report in finally block. But rethrow the exception are sent report twice
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user hyunsik opened a pull request:

          https://github.com/apache/tajo/pull/667

          TAJO-1725: TaskContainer can hang when RuntimeException occurs in TaskImpl

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/hyunsik/tajo TAJO-1725

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/tajo/pull/667.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #667


          commit 14e8c62bb5032f3742059697dd6a90fee605838e
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-30T08:21:13Z

          TAJO-1725: TaskContainer can hang when RuntimeException occurs in TaskImpl.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/667 TAJO-1725 : TaskContainer can hang when RuntimeException occurs in TaskImpl You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-1725 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/667.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #667 commit 14e8c62bb5032f3742059697dd6a90fee605838e Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-30T08:21:13Z TAJO-1725 : TaskContainer can hang when RuntimeException occurs in TaskImpl.

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              hyunsik Hyunsik Choi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development