[Bug] copilot-language-server processes are left behind when Eclipse exits
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with com.microsoft.copilot.eclipse.core/plugin.xml and the copilot-language-server lifecycle managed through LSP4E; review the lastDocumentDisconnectedTimeout setting and the OSGi shutdown path. Trace com.microsoft.copilot.eclipse.ui.CopilotUi$1 and the reported activation job, then determine how cleanup behaves after a hard JVM exit. Done means an Eclipse exit does not leave orphaned copilot-language-server processes or shared-state locks behind.
Written by the indexing model from the issue text.
Description
Environment
- OS: RHEL 9 (x86_64), home directory on NFS
- Eclipse Version: 4.38, Java 25
- Plugin Version: 0.20.0.202607100822 (copilot-language-server 1.509.5)
Describe the bug
copilot-language-server never gets killed when Eclipse exits uncleanly. The processes
get re-parented to PID 1 and just stay there. I found 11 of them on one machine, the
oldest 8 days old, roughly 1.2 GB RSS in total. After I killed those, 3 more had piled
up within two hours of normal use.
They all look like this:
pid=<A> ppid=1 age=693280s
<eclipse-configuration>/org.eclipse.osgi/<id>/0/.cp/copilot-agent/copilot-language-server --stdio
I think the reason is lastDocumentDisconnectedTimeout="2147483647" in
com.microsoft.copilot.eclipse.core/plugin.xml. It used to be 30 and was changed to
Integer.MAX_VALUE in 2c6b5452 ("fix - Defer shutdown time to MAX integer"), with a TODO
on the same line. So LSP4E never stops the server on idle, and the only thing that can
stop it is a clean bundle stop at shutdown.
In my case shutdown was never clean, because Copilot's own activation job was stuck:
Job found still running after platform shutdown. Jobs should be canceled by the
plugin that scheduled them during shutdown:
com.microsoft.copilot.eclipse.ui.CopilotUi$1 RUNNING
com.microsoft.copilot.eclipse.ui.preferences.McpPreferencePage$1 RUNNING
so every exit leaked one more server. singleton="true" doesn't help, since the old ones
aren't children of any running IDE anymore.
To Reproduce
- Start Eclipse with the plugin and let Copilot activate.
- Get the platform into a state where it can't shut down cleanly. In my case the
activation job was blocked; killing the JVM has the same effect. pgrep -af copilot-language-server— the server is still running with ppid 1.- Repeat. They accumulate.
Expected behavior
The language server should be terminated when its IDE goes away, including on a hard
exit.
Additional context
This isn't only about wasted memory. The orphans keep holding locks on shared state
under $XDG_CONFIG_HOME/github-copilot. In our case they starved the SQLite checkpoint
on auth.db until the plugin stopped working altogether — filing that separately.
It's also self-reinforcing: a stuck activation job prevents a clean shutdown, which
leaks another server, which makes contention worse the next time around.
Would it be possible to destroy the process from a JVM shutdown hook too, so it doesn't
depend on the OSGi stop path? Reaping servers whose parent IDE no longer exists at
startup would also clean up the ones already out there.
- Dominant language
- Java
- Stars
- 126
- Forks
- 60
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 5
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/copilot-for-eclipse
-
[Feature Request] Copilot CLI Quick Launcher (Just like Intellij) with WSL & Auto-Install SupportOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 42/100
microsoft/copilot-for-eclipse#473 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/copilot-for-eclipse#472 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/copilot-for-eclipse#465 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/copilot-for-eclipse#458 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/copilot-for-eclipse#450 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in microsoft/copilot-for-eclipse
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liquid-java/liquidjava#321 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenConext/OpenConext-access#1015 ·
Maintainers usually reply within 1 day
-
68000: FDBcc branch target is 2 bytes too low (uses inst_start+2 instead of the displacement word)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NationalSecurityAgency/ghidra#9702 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/rocketmq-dashboard#5358 ·
Maintainers usually reply within 3 days