This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-06
Channels
- # adventofcode (106)
- # aleph (1)
- # announcements (1)
- # asami (14)
- # babashka (120)
- # beginners (54)
- # calva (106)
- # chlorine-clover (33)
- # clj-kondo (5)
- # cljdoc (3)
- # cljs-dev (3)
- # clojure (92)
- # clojure-android (1)
- # clojure-australia (2)
- # clojure-europe (24)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-uk (16)
- # clojuredesign-podcast (1)
- # clojurescript (29)
- # code-reviews (58)
- # conjure (16)
- # core-logic (4)
- # cursive (9)
- # datalevin (2)
- # graphql (20)
- # gratitude (7)
- # jackdaw (11)
- # java (9)
- # jobs (2)
- # lsp (23)
- # minecraft (1)
- # missionary (28)
- # off-topic (5)
- # polylith (5)
- # react (1)
- # reagent (12)
- # releases (1)
- # remote-jobs (4)
- # reveal (7)
- # shadow-cljs (8)
- # slack-help (1)
- # tools-deps (11)
- # vim (6)
I’m afraid I also have a case of 100% CPU usage, but basically all the time, not just for a while. I mean, I just had lunch and it stayed on 100% all that time. I’m using the latest version through Calva (vscode). In the trace log (enabled through Calva settings), I don’t see anything happening. Also the log file doesn’t show anything happening. I have already tried to throw away all things like caches. One special thing of note maybe: sometimes it’s OK when I launch vscode and start working, and then it starts thrashing at some point (and doesn’t stop). I don’t know what triggers it. Oh and force-killing the process just causes it to restart and immediately get back into the same situation. The fans of my laptop would be very grateful for a solution or suggestions on how to diagnose this. As would I 🙂
clojure-lsp version used: 2021.12.01-12.28.16
clj-kondo version used: 2021.10.20-SNAPSHOT
Clojure-lsp server info:
{
"client-settings": {
"auto-add-ns-to-new-files?": true,
"cljfmt": {
"indents": {}
},
"document-formatting?": false,
"dependency-scheme": "jar",
"keep-require-at-start?": true,
"document-range-formatting?": false,
"cljfmt-config-path": ".cljfmt.edn"
},
"project-root-uri": "[redacted]",
"clj-kondo-version": "2021.10.20-SNAPSHOT",
"final-settings": {
"auto-add-ns-to-new-files?": true,
"cljfmt": {
"indents": {}
},
"document-formatting?": false,
"dependency-scheme": "jar",
"keep-require-at-start?": true,
"source-paths": [
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]"
],
"project-specs": [
{
"project-path": "project.clj",
"classpath-cmd": [
"lein",
"classpath"
]
},
{
"project-path": "deps.edn",
"classpath-cmd": [
"clojure",
"-A:dev:test",
"-Spath"
]
},
{
"project-path": "build.boot",
"classpath-cmd": [
"boot",
"show",
"--fake-classpath"
]
},
{
"project-path": "shadow-cljs.edn",
"classpath-cmd": [
"npx",
"shadow-cljs",
"classpath"
]
},
{
"project-path": "bb.edn",
"classpath-cmd": [
"bb",
"print-deps",
"--format",
"classpath"
]
}
],
"source-aliases": [
{},
{}
],
"uri-format": {
"upper-case-drive-letter?": false,
"encode-colons-in-path?": false
},
"document-range-formatting?": false,
"cljfmt-config-path": ".cljfmt.edn"
},
"port": "NREPL only available on :debug profile (
make debug-bin`)",`
"server-version": "2021.12.01-12.28.16",
"log-path": "/var/folders/pb/bpqwngc509z77r228yr_75z00000gn/T/clojure-lsp.17387178897337450842.out",
"project-settings": {}
}
@UKFSJSM38 I've suffered from 100% CPU usage and my Emacs locking up; I didn't particularly suspect LSP until now, but I guess it may be related. We do use custom source-paths
in our monorepo - is there some kind of hypothesis I can help you to debug?
could you paste the output o clojure-lsp server log? there is a command for that as well
@U05476190 not really, is just that I saw a lot of source-paths and I thought it could be some weird custom config
usually clojure-lsp CPU takes time only when starting the procces/analyzing the project, after that it should be ok
No, this is an issue of emacs locking up and requiring restart. Next time it happens, what kind of data should I try to extract from running processes?
@UGNFXV1FA - sorry, didn't mean to derail your thread :)
@UKFSJSM38 I just now saw that you requested server logs, sorry about that. I guess somebody hijacked my thread 😛 I got a 3MB file here, which I don’t really want to post to Slack. What’s the best way to get it to you?
That sounds big and hard to debug, could you try to restart and reproduce the issue again? Also is that the clojure-lsp server log, not the client<->server json one, right?
Huh it turns out that the troublesome repo was not the one I was working in, but a second one that I also had open in vscode. This is the log:
2021-12-07T06:49:30.778Z INFO [clojure-lsp.server:446] - Starting server...
2021-12-07T06:49:30.890Z DEBUG [clojure-lsp.nrepl:21] - nrepl not found, skipping nrepl server start...
2021-12-07T06:49:30.919Z INFO [clojure-lsp.server:319] - Initializing...
and this is the output of the client in vscode:
[Trace - 7:57:27 AM] Sending request 'initialize - (0)'.
[Trace - 7:57:27 AM] Received notification '$/progress'.
After that I killed it. I know noticed that in that window, in the status bar it keeps saying “Initializing Clojure language features via clojure-lsp” indefinitely. Also in that repo I cleaned everything out (`rm -rf .lsp`), which didn’t help.