You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by abhishekagarwal87 <gi...@git.apache.org> on 2016/07/19 09:37:52 UTC

[GitHub] storm pull request #1575: STORM-1600: Do not report exceptions after jvm shu...

GitHub user abhishekagarwal87 opened a pull request:

    https://github.com/apache/storm/pull/1575

    STORM-1600: Do not report exceptions after jvm shutdown

    @HeartSaVioR  - Here is the proposed change. Can you suggest some way to reproduce a scenario which I could also add as a test case?

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

    $ git pull https://github.com/abhishekagarwal87/storm STORM-1600

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

    https://github.com/apache/storm/pull/1575.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 #1575
    
----
commit 04ea50f676855b47e86f00ba0d320fabc51dbdf1
Author: Abhishek Agarwal <ab...@inmobi.com>
Date:   2016-07-19T09:35:38Z

    STORM-1600: Do not report exceptions after jvm shutdown

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1575: STORM-1600: Do not report exceptions after jvm shu...

Posted by abellina <gi...@git.apache.org>.
Github user abellina commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1575#discussion_r71644658
  
    --- Diff: storm-core/src/clj/org/apache/storm/daemon/executor.clj ---
    @@ -205,15 +205,17 @@
          :report-error-and-die (reify
                                  Thread$UncaughtExceptionHandler
                                  (uncaughtException [this _ error]
    -                               (try
    -                                 ((:report-error <>) error)
    -                                 (catch Exception e
    -                                   (log-error e "Error while reporting error to cluster, proceeding with shutdown")))
    -                               (if (or
    -                                    (Utils/exceptionCauseIsInstanceOf InterruptedException error)
    -                                    (Utils/exceptionCauseIsInstanceOf java.io.InterruptedIOException error))
    -                                 (log-message "Got interrupted excpetion shutting thread down...")
    -                                 ((:suicide-fn <>)))))
    +                               (if (Utils/isShutdownUnderProgress)
    +                                 (log-warn error "Uncaught exception in thread after jvm shutdown")
    +                                 ((try
    +                                    ((:report-error <>) error)
    +                                    (catch Exception e
    +                                      (log-error e "Error while reporting error to cluster, proceeding with shutdown")))
    +                                   (if (or
    +                                         (Utils/exceptionCauseIsInstanceOf InterruptedException error)
    +                                         (Utils/exceptionCauseIsInstanceOf java.io.InterruptedIOException error))
    +                                     (log-message "Got interrupted excpetion shutting thread down...")
    --- End diff --
    
    nitpick: fix spelling of exception.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm issue #1575: STORM-1600: Do not report exceptions after jvm shutdown

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1575
  
    Regarding test case, we're trying to shutdown JVM and throwing exception concurrently, so I wonder we can make it consistent. I also don't have an idea regarding the test which tries to shutdown JVM, and wonder it can be passed without affecting other tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request #1575: STORM-1600: Do not report exceptions after jvm shu...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/1575


---

[GitHub] storm pull request #1575: STORM-1600: Do not report exceptions after jvm shu...

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1575#discussion_r71470446
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -1772,6 +1783,7 @@ public static String uuid() {
         public static void exitProcess (int val, String msg) {
             String combinedErrorMessage = "Halting process: " + msg;
             LOG.error(combinedErrorMessage, new RuntimeException(combinedErrorMessage));
    +        isJVMShutdownInitiated.set(Boolean.TRUE);
    --- End diff --
    
    ShellSpout and ShellBolt just call System.exit() directly from their die() method. You may want to change those too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---