[ 
https://issues.apache.org/jira/browse/STORM-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033140#comment-14033140
 ] 

ASF GitHub Bot commented on STORM-183:
--------------------------------------

Github user revans2 commented on the pull request:

    https://github.com/apache/incubator-storm/pull/143#issuecomment-46248380
  
    When I ran I did run jstack on the workers and all of them were stuck 
somewhere in the shutdown.  So if you fixed the worker you would not see this.
    
    ```"Thread-23" #51 prio=5 os_prio=31 tid=0x00007f91a1059000 nid=0xb103 in 
Object.wait() [0x0000000193600000]
       java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Thread.join(Thread.java:1244)
        - locked <0x000000011a65d4f8> (a java.lang.Thread)
        at java.lang.Thread.join(Thread.java:1318)
        at backtype.storm.util$async_loop$reify__1051.join(util.clj:486)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:298)
        at 
backtype.storm.daemon.executor$mk_executor$reify__5504.shutdown(executor.clj:353)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:298)
        at 
backtype.storm.daemon.worker$fn__5930$exec_fn__2806__auto____5931$shutdown_STAR___5949.invoke(worker.clj:392)
        at 
backtype.storm.daemon.worker$fn__5930$exec_fn__2806__auto__$reify__5975.shutdown(worker.clj:423)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:298)
        at backtype.storm.daemon.worker$_main$fn__6002.invoke(worker.clj:455)
        at 
backtype.storm.util$add_shutdown_hook_with_force_kill_in_1_sec$fn__975.invoke(util.clj:433)
        at clojure.lang.AFn.run(AFn.java:24)
        at java.lang.Thread.run(Thread.java:744)```
    



> Supervisor/worker shutdown hook should be called in distributed mode.
> ---------------------------------------------------------------------
>
>                 Key: STORM-183
>                 URL: https://issues.apache.org/jira/browse/STORM-183
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>            Reporter: caofangkun
>            Priority: Minor
>         Attachments: STORM-183-1.patch
>
>
> if the process is killed forcefully from the OS or if it's crashing due to 
> resource issues (e.g., out of memory), shutdown hooks won't be invoked.
> -TERM (15) 
> The process is requested to stop running; it should try to exit cleanly 
> -KILL (9) 
> The process will be killed by the kernel; this signal cannot be ignored.
> So should we better use 'kill -15' ?
> See:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/util.clj#L392
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L175
> will never be called for supervisor:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L396
> will never be called for worker:
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/worker.clj#L421
> We'd better add something like :
> (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.shutdown mk-sv)))))) 
>  ?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to