Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two ZLS instances can sometimes end up running at the same time #87

Open
Darkyenus opened this issue Dec 8, 2024 · 2 comments
Open
Labels
bug Something isn't working lsp4ij-upstream The bug is in LSP4IJ, report upstreamed to them

Comments

@Darkyenus
Copy link

I don't know how, it might be my fault (because I was restarting IDE and force quitting zls because it was freezing on me), but I ended up with unresponsive ZLS and this error in IDE error reporting:

java.lang.IllegalStateException: Missing header Content-Length in input "otn-egh 54
{"sorc:20,i""""eut:"aaiiis:{pstoEcdn""t-6,txDcmnSn"{oeoe:re"hng"2"ilae:re"ilaeatni"tu,sv"tu}"opeinrvdr:"rgeCaatr"[.,:,"@,],/]"eovPoie"fle,cmltoIe"{lblealSpot:re}"oePoie"tu,sgaueeprvdrigrhrces:"",rtigrhrces:""}"elrtoPoie"tu,dfntoPoie"tu,tpDfntoPovidr:re"mlmnainrvdr:as,rfrnePoie"tue"ouetihihPoie"tu,dcmnSmoPoie"tru,cdAtoPoie"tu,clrrvdr:as,wrsaeyblrvdr:as,dcmnFratnPoie"tu,dcmnRaneomtigrvdr:as,rnmPoie"tu,fligagPoie"tu,slcinagPoie"tu,smniTknPoie"{lgn"{tknye"[nmsae,tp""ls""nm,itrae,src""yeaaee""aaee""aibe,poperty,euMme""cn,mto""ar""ewr""oiir,cmet,srn""ubr,rar,erra"bitn,lbl,kyodiea""no""pqe]"oeMdfes:"elrto""eiiin,raolai""erctd,asrc""sn""oiiain,dcmnain,dfutirr""eei"""}"ag"tu,fl"tru}"naHnPoie"tu,wrsae:"okpcFles:"upre"tu,cagNtfctos:re},sreIf"{nme""l""eso"".30}}otntLnt:9
"snp"".""d:2,"nl,err:"oe:360"esg""naiRquet,dt"nl}7

"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Since that looks like absolute gibberish, I opened process manager and sure enough, there were two instances of zls.exe running. After killing them both, everything started working fine.

I am not 100% sure that it was related, but I have no idea what else could produce that JSON abomination.


Zig: 0.13.0
ZLS: 0.13.0

IntelliJ IDEA 2024.2.3 (Community Edition)
Build #IC-242.23339.11, built on September 25, 2024
Runtime version: 21.0.4+13-b509.17 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 10.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 8000M
Cores: 16
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
org.jetbrains.idea.grammar (2022.3.2)
be.jbeckers.compare_tab_with_editor2 (1.0.18)
com.darkyen.darkyenustimetracker (1.5.3)
PsiViewer (242.4697)
GLSL (1.24)
com.redhat.devtools.lsp4ij (0.6.0)
com.falsepattern.zigbrains (17.3.0-242)
String Manipulation (9.14.1)
BrowseWordAtCaret (3.0.5)
PythonCore (242.23339.11)
jclasslib (6.0.5.1)
net.seesharpsoft.intellij.plugins.csv (3.4.0-242)
23.bytecode-disassembler (1.0.10-beta1)
org.jetbrains.android (242.23339.11)
com.android.tools.design (242.23339.11)
uk.me.jeffsutton.restconsole (1.4)
Kotlin: 242.23339.11-IJ

@FalsePattern
Copy link
Owner

I have no idea what could cause this, it could've been just that weird restart state, but I'll keep this open for now.
Post a comment if it happens again and I'll investigate.

@FalsePattern FalsePattern added bug Something isn't working need more info Weird/hard to reproduce bug that needs extra info to debug labels Dec 8, 2024
@angelozerr
Copy link

I have noticed that sometimes LSP4IJ doesn't kill correctly the started process. I have created an issue for that redhat-developer/lsp4ij#542

@FalsePattern FalsePattern added lsp4ij-upstream The bug is in LSP4IJ, report upstreamed to them and removed need more info Weird/hard to reproduce bug that needs extra info to debug labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp4ij-upstream The bug is in LSP4IJ, report upstreamed to them
Projects
None yet
Development

No branches or pull requests

3 participants