Open pjssilva opened 2 years ago
Confirm the issue both on MacOS and Windows 10 with Microsoft OpenJDK 17 installed
I have same issue both on intel Mac and M1 Mac.
Another way to reproduce it:
Reload Required
)In case of a larger file, the LTeX-LS java process will still be consuming the CPU.
I confirm this on my Mac. This seems to happen more when you have Markdown files open.
I confirm that this issue exists on different versions of Windows and on different versions of Linux.
P.S. why does this issue have the 2-unconfirmed
label? (several people have confirmed this issue now)
Definitely an issue, yes. (This is after all VSCode has been quit). I didn't realise it was from LTex since the macOS Activity Monitor only says "java" (with parent process being launchd
):
However, upon checking with ps
, I confirm too that they are all LTex language server processes that have accumulated over time:
I thought maybe https://github.com/valentjn/ltex-ls/issues/117 might be related (similar issue, and popped up around similar time last year), but it seems that's already closed so I don't know.
I thought maybe valentjn/ltex-ls#117 might be related (similar issue, and popped up around similar time last year), but it seems that's already closed so I don't know.
It is worth noting that it does with both OpenJDK and the "official" (Oracle) one
This bug affects me also. I have an M1 Macbook with 8 Gb of memory, and when I close different apps to free up the memory, I can see this leftover java process after closing VSCode.
It says here: https://github.com/microsoft/vscode-jupyter/issues/1626#issuecomment-631581750
that they give 5 seconds to processes to shutdown when VSCode exits. Can it be that ltex does not shutdown within these 5 seconds?
This is close to a deal breaker. It leaves a java.exe
running for every instance vscode opened.
Depends on the side of the project, they can consume north of 1GB+ of memory.
that they give 5 seconds to processes to shutdown when VSCode exits. Can it be that ltex does not shutdown within these 5 seconds? Some of the projects I test are extremely light. My guess the extension just didn't kill the process.
https://github.com/valentjn/vscode-ltex/blob/develop/src/extension.ts
There is no deactivate
function defined.
Any news on this?
I had this problem some months ago on my Mac, but not anymore. Anyone else not experiencing this anymore?
The latest (non-pre-release) version of LTeX was published in Nov 2021 (see releases), and I first installed LTeX in Feb 2022, so maybe the problem disappeared by updating VS Code to a certain version.
I had this problem some months ago on my Mac, but not anymore. Anyone else not experiencing this anymore?
I still have it.
I am experiencing the same problem on Linux. The poor machine's memory was full of LTeX 😂
I use VSCode on mac, but through remote-development to an Ubuntu 16.04 machine. On the Ubuntu machine I have vscode server and LTeX installed.
Everyday when I leave my office, I shutdown all VSCode windows on my mac, but LTeX process with Java does not exit.
Next day I open all VSCode windows again, another LTeX process will be created.
As a result, yesterday I found my Ubuntu machine memory almost full, and there was over 20 LTeX running. I had to kill all of them manually.
I don't know if it's a cross-platform problem, or it's just with VSCode client on mac, or *nix
============== Quite easy to re-produce. Just re-open all VSCode windows, and then more LTeX processes come
I still have the problem on my MacBook pro M1 MacOS Monterey 12.6.3. And another related problem is the java causes high CPU and memory overhead, even the fan of my mac are spinning, which you know the fan of MacBook pro M1 is very hard to activate. This exists even after I quit VSCode.
I thought this problem went away at some point, but recently, it's back. My current workaround is to periodically run:
pkill -f extensions/valentjn.vscode-ltex
Though of course that is not quite ideal...
I can confirm this issue is present on openSUSE Tumbleweed
I'm getting this issue too. MacOS 13.3.1 on an x86 machine.
@valentjn any news on this?
I am mostly experiencing this on macOS.
I think my Linux machines are ending potentially left java processes themselves (probably systemd
cleaning up orphans).
Using the bundled binaries on both Linux and macOS atm.
Same issue here.
These processes eat quite a lot of memory.
I'm noticing after opening vscode with a markdown file ltex is leaving stray processes open on windows 10 after vscode is closed every time now
Is anyone able to fix this problem and open a PR for it? (unfortunately I am not)
Switching to code spell checker seems to be the only option at the moment
Switching to code spell checker seems to be the only option at the moment
Unfortunately, this is "A simple source code spell checker for code" and it doesn't use LanguageTool.
Switching to code spell checker seems to be the only option at the moment
Unfortunately, this is "A simple source code spell checker for code" and it doesn't use LanguageTool.
It does work with markdown files at least, but I admit its not as good as it doesn't cover grammer
It does work with markdown files at least, but I admit its not as good as it doesn't cover grammer
"LanguageTool" is a "multilingual spelling, style, and grammar checker" while "Spelling Checker for Visual Studio Code" is a "A simple source code spell checker for code" [definitions from their respective websites]
They are completely different tools (used for different purposes)
But we should stop going off topic here. This issue is about the Java processes that keep running after you close VS Code. Is anyone able to fix this problem and open a PR for it?
@daniporr I agree with you but, even if someone submitted a PR to fix this (which https://github.com/valentjn/vscode-ltex/pull/758 maybe already does, right? @nicholas-l), I would not hold my breath for it to be reviewed/merged, given that the last merged PR is about 2 years old now. Maybe @nicholas-l's fork is the way to go? Although I'm not sure how to use a fork in VSCode...
Well, can he not just create a new extension based on the fork? There are loads of extensions based off of a fork. Depending on the license on this repo, this should be perfectly doable. Hell, given how many people work on this, it might make sense to create an org in Github and turn this to the community, since there seems to be loads of people interested.
I know I'd try to help to the extent I have time to.
@nicholas-l are you interested in publishing a fork one based on your changes? Your PR looks reasonable. I can work with you on it if you are interested.
@briochemc @meneguzzi @unional thank you for sharing these wonderful ideas!
Since this extension is based on another project of @valentjn (ltex-ls), and since there are commits from the beginning of this year (in both projects) I think we should give @valentjn the chance to rebut if
@valentjn do you have any answers to these points?
Note that this (especially, 3.) will simplify the whole process
Hi @valentjn please let us know if you are active or want to continue to maintain these repos.
In the mean time, I have created https://github.com/neo-ltex for publishing the fix.
Anyone who would like to contribute please feel free to drop a note.
Hi, is there a corresponding extension in the VSCode Marketplace @unional?
https://marketplace.visualstudio.com/items?itemName=neo-ltex.ltex
Releasing 13.1.1 which fixes this issue.
It's still in early stage as I'm keeping most of the code identical. So many links and references are likely off.
There are also quite a few things to change to improve the DX before the code can be cleaned up.
Ok, so let's move part of this discussion to the new repo. I'm short of time in the next two weeks, but I will try to pitch in as soon as possible.
@nicholas-l are you interested in publishing a fork one based on your changes? Your PR looks reasonable. I can work with you on it if you are interested.
Sorry I missed this. I was hoping that we could merge the fixes into this repo but looks like its unmaintained now. The new repo looks good, great work getting updating all the dependencies @unional . I'll have a go at using the new extension.
I'll have a go at using the new extension.
@nicholas-l the new extension contains your fix.
I'm gradually updating the development environment to make it easier to work with. After that, will see if we can get some low hanging food added to the extension.
Enter a summary of the issue in the title field above and replace this sentence with the bug report from your clipboard.
Describe the bug When I use vscode-ltex it leaves a stray java process behind even after I close the editor.
Steps to reproduce Steps to reproduce the behavior:
1.Open any LaTeX document in vscode with ltex installed.
Expected behavior I would expect all java processes started by vscode-ltex to terminate upon closing vscode.
Sample document Any document will do, see the example below.
LTeX configuration Please paste all configuration settings starting with
ltex.
from yoursettings.json
. You can help us by temporarily removing some irrelevant settings from yoursettings.json
and see if the bug still occurs."LTeX Language Server" log file First, reproduce the bug. Then, go to
View
→Output
and selectLTeX Language Server
in the drop-down list. Paste this log here:"LTeX Language Client" log file First, set the
ltex.trace.server
setting in yoursettings.json
to"verbose"
. Then, reload the VS Code window and reproduce the bug. Go toView
→Output
and selectLTeX Language Client
in the drop-down list. Paste this log here (note: it will contain your checked document):Version information List here the version information of the relevant software.
Additional context/information You can add any other context or information about the problem here.