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

    https://github.com/apache/incubator-storm/pull/139#discussion_r13765591
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/worker.clj ---
    @@ -448,4 +448,6 @@
     (defn -main [storm-id assignment-id port-str worker-id]  
       (let [conf (read-storm-config)]
         (validate-distributed-mode! conf)
    -    (mk-worker conf nil storm-id assignment-id (Integer/parseInt port-str) 
worker-id)))
    +    (.addShutdownHook (Runtime/getRuntime)
    --- End diff --
    
    I'm not sure that this shutdown hook will be called in all cases.  Most 
places the worker code calls Runtime.halt on error, which does not call any of 
the shutdown hooks.  It just exits.  I think that was done because shutdown 
hooks can lock up, and if they do the process does not exit.  So we could get 
zombie processes.  Typically I have seen this addressed by installing a 
shutdown hook that will let the other shutdown hooks run for a maximum amount 
of time, at which point it calls Runtime.halt.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to