Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] copilot-language-server processes are left behind when Eclipse exits

Aperta
#440 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
desktop

Direzione di ricerca

Inizia da com.microsoft.copilot.eclipse.core/plugin.xml e dal ciclo di vita di copilot-language-server gestito tramite LSP4E; esamina l’impostazione lastDocumentDisconnectedTimeout e il percorso di arresto di OSGi. Traccia com.microsoft.copilot.eclipse.ui.CopilotUi$1 e il job di attivazione segnalato, quindi determina come si comporta la pulizia dopo un’uscita forzata della JVM. Il lavoro è completato quando l’uscita da Eclipse non lascia processi copilot-language-server orfani né lock sullo stato condiviso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

  1. Start Eclipse with the plugin and let Copilot activate.
  2. 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.
  3. pgrep -af copilot-language-server — the server is still running with ppid 1.
  4. 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.

Lingua principale
Java
Stelle
128
Fork
66
Merge medio
1g 14h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/copilot-for-eclipse

Tutte le issue di microsoft/copilot-for-eclipse

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.