This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-08
Channels
- # announcements (1)
- # babashka (28)
- # beginners (30)
- # calva (1)
- # cider (13)
- # clojure (26)
- # clojure-brasil (2)
- # clojure-europe (29)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-norway (16)
- # clojure-spec (4)
- # clojure-uk (5)
- # cursive (17)
- # data-science (15)
- # datomic (8)
- # emacs (8)
- # events (1)
- # hyperfiddle (54)
- # joyride (18)
- # jvm (2)
- # kaocha (8)
- # lsp (8)
- # malli (4)
- # missionary (11)
- # reagent (5)
- # reitit (13)
- # releases (2)
- # rum (2)
- # scittle (6)
- # shadow-cljs (3)
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?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
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
@U053XQP4S yeah I realized that it was actually interrupted because higher up m/reduce call was malformed