adzerk-oss / boot-reload

Boot task providing live-reload of browser css, images, etc.
Eclipse Public License 1.0
87 stars 35 forks source link

Not harmful exception at shutdown #114

Open arichiardi opened 7 years ago

arichiardi commented 7 years ago

The following exception started appearing recently when C-c in the terminal (probably related to the new shutdown hook?)

java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@1c529dea rejected from java.util.concurrent.ThreadPoolExecutor@cf4fb77[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 65]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at org.httpkit.server.RingHandler.clientClose(RingHandler.java:214)
    at org.httpkit.server.HttpServer.closeKey(HttpServer.java:92)
    at org.httpkit.server.HttpServer.stop(HttpServer.java:320)
    at org.httpkit.server$run_server$stop_server__94.doInvoke(server.clj:31)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.AFn.applyToHelper(AFn.java:152)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at powerlaces.boot_figreload.server$stop.invokeStatic(server.clj:132)
    at powerlaces.boot_figreload.server$stop.invoke(server.clj:130)
    at clojure.lang.AFn.applyToHelper(AFn.java:152)
    at clojure.lang.AFn.applyTo(AFn.java:144)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.core$apply.invokeStatic(core.clj:657)
    at clojure.core$apply.invoke(core.clj:652)
    at boot.pod$eval_fn_call.invoke(pod.clj:359)
    at boot.pod$call_in_STAR_.invoke(pod.clj:410)
    at clojure.lang.Var.invoke(Var.java:379)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:109)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:102)
    at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at boot.pod$call_in_STAR_.invoke(pod.clj:413)
    at powerlaces.boot_figreload$eval1219$fn__1220$fn__1229.invoke(boot_figreload.clj:151)
    at boot.core$do_cleanup_BANG_$fn__463.invoke(core.clj:204)
    at boot.core$do_cleanup_BANG_.invoke(core.clj:204)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.lang.Thread.run(Thread.java:745)

I will gladly merge a patch to https://github.com/boot-clj/boot-figreload :dancer:

Deraen commented 7 years ago

Hmm, I am unable to reproduce this.

arichiardi commented 7 years ago

It happens with:

Mon Jan 30 10:15:20 PST 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0-alpha14
BOOT_VERSION=2.7.0

On linux if it can help.

Deraen commented 7 years ago

Can you try if you can reproduce this with https://github.com/Deraen/saapas, this is how I tested this:

❯ boot repl
boot.user=> (boot (dev))
Starting reload server on ws://localhost:45105
Writing boot_cljs_repl.cljs...

Starting file watcher (CTRL-C to quit)...

Writing adzerk/boot_reload/js/main.cljs to connect to ws://localhost:45105...
Adding :require adzerk.boot-reload.js.main to js/main.cljs.edn...
Compiling {less}... 2 changed files.
nREPL server started on port 33657 on host 127.0.0.1 - nrepl://127.0.0.1:33657
Adding :require adzerk.boot-cljs-repl to main.cljs.edn...
Compiling ClojureScript...
• js/main.js
Starting web server on http://localhost:10555
Elapsed time: 25.916 sec
<< Open the site on browser to check everything is working >>
<< C-c >>

boot.user=> 
arichiardi commented 7 years ago

My case is from the command line, I will try to reproduce with sapaas