This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-03
Channels
- # announcements (7)
- # beginners (114)
- # boot (5)
- # calva (25)
- # cider (26)
- # clojure (82)
- # clojure-dev (20)
- # clojure-europe (2)
- # clojure-italy (8)
- # clojure-losangeles (4)
- # clojure-norway (6)
- # clojure-uk (16)
- # clojurescript (21)
- # clojurex (3)
- # core-async (24)
- # cursive (25)
- # datomic (17)
- # emacs (5)
- # events (4)
- # fulcro (9)
- # funcool (1)
- # graalvm (4)
- # hyperfiddle (2)
- # midje (2)
- # mount (2)
- # off-topic (10)
- # pathom (11)
- # pedestal (5)
- # re-frame (36)
- # reagent (15)
- # reitit (3)
- # ring (4)
- # slack-help (2)
- # spacemacs (3)
- # sql (16)
- # tools-deps (5)
How can I detect which library/go-block is locking my system?
my system has locked, and I solved it with -Dclojure.core.async.pool-size=500
whichever one is doing IO?
if you take a thread dump, it's probably obvious
Lot of threads in many states:
java.lang.Thread.State: RUNNABLE
java.lang.Thread.State: TIMED_WAITING (on object monitor)
java.lang.Thread.State: TIMED_WAITING (parking)
java.lang.Thread.State: TIMED_WAITING (sleeping)
java.lang.Thread.State: WAITING (on object monitor)
java.lang.Thread.State: WAITING (parking)
What should I look for? There is some doc about debug it? What the name of this problem (so I can search resources my own)if you are digging through thread dumps you should not set the core.async pool size so high
but even before digging through threaddumps I would go back and look at the code I wrote to see if I am doing anything blocking in a go block
dead lock is nothing happening (so low resource usage) live lock is lots going on (high resource usage) but nothing happening
There is a deftest block that freezes. It simply stops, no more logs, do not end and CPU goes to "0%"
Many of java.lang.Thread.State: WAITING (parking)
are caused due (<!! p)
inside datomic.client.api
where p
is a clojure.core/promise
. Is it relevant?
my guess there would be you are waiting on a channel that doesn't have anything written to it somewhere
<!! is a blocking operation and you shouldn't do that in a go block
d/pull is a database op, which should always be assumed to be IO
and thus don't do it in a go block
probably better, but I would read the fine print and still probably shouldn't do it in a go block - prob a better question for #datomic. doing this in pipeline-blocking or pipeline-async or a no-go thread prob better