Fork me on GitHub
#calva
<
2020-01-29
>
grounded_sage10:01:12

I’m suddenly experiencing a show stopper bug which appears to be coming from the Calva extension. Running VScode SSH’d into a remote server and running a REPL: On AWS EC2, Running VScode on a Mac, Using Clojure CLI. • Backspace suddenly stops working (though seems to work if I hold down shift SHIFT + Backspace , backspace works as normal in non clj files) • Can no longer run and calva commands (registers CTRL+ALT+C in bottom bar but any command following the command log disappears with nothing happning) • Slurping and Barfing of parens stops working • Can’t CTRL-C to stop the REPL in the VScode terminal • Works upons restarting VScode or uninstalling/reinstalling the extension

grounded_sage10:01:56

Possible reason: Working with a relatively large amount of data both at the REPL and reading into memory. Though this seems very opaque to me.

pez10:01:10

Calva doesn't handle large results well. It's high up on our todo.

grounded_sage10:01:52

Yea I saw that it is in the Clojurists together plans.

grounded_sage11:01:17

Just checked with DevOps and it seems that the CPU is maxing out. Despite no code changes since yesterday. So this seems to prevent me from backspacing/performaing calva commands and stopping the REPL in VScode.

pez11:01:55

Do you have anything that evaluates something expensive and/or large when you load a file?

grounded_sage11:01:11

There is some functions but all code is actually behind a (comment …) at the moment and I’m driving it.

grounded_sage11:01:40

So it’s pretty much just helper functions at the moment. That gets evaluated on load.

pez11:01:54

Then there shouldn't be a reason for things hanging....

grounded_sage11:01:05

That’s why I am very confused. We can’t even SSH into the server now so it’s likely this was just an early warning sign to a larger issue… I found it curious how I was unable to stop the REPL in the VScode terminal etc but could still edit the file (with the caveat of behaviours above) and could backspace normally in other non clj files.

grounded_sage18:01:54

Ok so after a full day of troubleshooting it is definitely a Calva related issue. I would assume it’s got to do with large data structures sent to the REPL. As the file size is ~850 lines aside from a few other namespaces which are significantly smaller and are all inside a comment block.

pez18:01:52

Even large data structures shouldn't get the cpu to max out. Sounds like something else is going on. But it is very hard to diagnose from what I know about the issue.

grounded_sage20:01:21

Yea it’s super bizarre. I’ve noticed that when I read in a few files, print them the slurping and barfing gets a little slower. Whatever is happening their is a cascading slow down and ultimately a failure where I can’t even stop the REPL and even to the point of not being able to SSH into server. Unfortunately I won’t be able to share the code as is and haven’t got the time to sanitise it.

bringe22:01:29

@grounded_sage Have you tried reproducing whatever you may have run up to that point of slow down but outside of Calva / VS Code, and then monitored the container's CPU before and after? That might help determine if Calva is the culprit.

grounded_sage23:01:08

I’m quite invested in VScode and it would take me an uncertain amount of time to get the remote setup with repl etc running. Then coordinating with someone who has access/knows their way around the AWS. I’m just going to cross my fingers it auto resolves itself or at least holds off long enough for me to complete this project at work.

bringe00:01:01

Ah I see. Well let us know if you happen to gain more info related to Calva.