I'm getting an interesting Exception in a missionary task:
[{:type java.lang.InterruptedException
:message nil
:at [java.util.concurrent.locks.AbstractQueuedSynchronizer tryAcquireSharedNanos "AbstractQueuedSynchronizer.java" 1133]}]
:trace
[[java.util.concurrent.locks.AbstractQueuedSynchronizer tryAcquireSharedNanos "AbstractQueuedSynchronizer.java" 1133]
[java.util.concurrent.CountDownLatch await "CountDownLatch.java" 276]
[clojure.core$promise$reify__8591 deref "core.clj" 7182]
[clojure.core$deref invokeStatic "core.clj" 2341]
[clojure.core$deref invoke "core.clj" 2323]
[taoensso.encore$eval3772$get_hostname__3773 invokePrim "encore.cljc" 5621]
[taoensso.timbre$get_hostname invokeStatic "timbre.cljc" 329]
[taoensso.timbre$get_hostname invoke "timbre.cljc" 329]
[taoensso.timbre$_log_BANG_$fn__4978 invoke "timbre.cljc" 483]
Seems like it is called by timbre when logging, it tries to get the hostname which uses encore, then some promise, which I suspect is interrupted by missionary
Timbre is not safe to use with missionary?does it necessarily mean the task was cancelled or could it be that the task was parked?
it goes like this:
(defn logged-task [] (m/via m/blk (do (log/info "logged throwing exception) (http-request)))
then
(m/? (logged-task))
after moving the log out of the via I don't get the error anymore obviously, and it is probably more correct, but if it was happening because the task was cancelled I have a problem
What is the context of (m/? (logged-task)) ? If it's from a plain thread then check if it's been interrupted, if it's from a coroutine context then it must have been cancelled somehow
@leonoel yeah I realized that it was actually interrupted because higher up m/reduce call was malformed
is it called in a m/via ?
Yes
When a m/via task is cancelled, the thread running it is interrupted, at which point blocking calls are expected to throw InterruptedException. Most likely your task has a timbre call somewhere in a finally block, which fails because host resolution is blocking.
Interesting so that would mean im accidently cancelling tasks
yes I would check that first