Subrocesses not being killed
I'm using PHPStan to lint PHP code.
My understanding is that each save should trigger an analyze command, and if a previous process is still running, it should terminate before a new one starts.
When checking the running processes via require('lint').get_running(), it only shows a single process, which seems correct. However, it appears that multiple processes are being spawned:
As you can see, only one command is phpstan analyze, others are subprocesses that seems to be orphans, and keep hanging for long minutes, and can take a lot of memory, affecting performance.
This behavior seems similar to issue #521, so I’m wondering if this might be a regression.
Please tell me if you need any more information.
I experience the same with shellcheck and flake8 I think it's major bug that must be fixed sooner I can't mend the throttling anyhow but rebooting the laptop which is annoying
This behavior seems similar to https://github.com/mfussenegger/nvim-lint/issues/521, so I’m wondering if this might be a regression.
There are test cases for the cancellation: https://github.com/mfussenegger/nvim-lint/blob/c9aa44ff09aeb8b06ba7ab1e58faab7c318f191b/spec/lint_spec.lua#L29-L54
So I'm fairly sure it didn't regress.
Could you check if you can terminate the orphan phpstan processes using kill ? nvim-lint first sends a sigint signal and if that doesn't work for ~10 seconds it sends a sigkill
Thank you for your response and for taking time to investigate.
At the time of creating this issue I had 8gb of ram, I since bought more and the issue seems to have disappear (or is less visible).
I tried to reproduce but the processes are now finishing too quick to be able to kill orphan ones (there are still orphans but they seem to not last long, and I don't know if they die by themselves or are killed by the plugin).
When I have time this week I'll try to edit phpstan to add sleep functions to simulate longer processes, but I don't know if it will work.
Maybe @lukoshkin can help if he can reproduce the problem.