intellij-powershell icon indicating copy to clipboard operation
intellij-powershell copied to clipboard

Long freeze on stage file

Open ForNeVeR opened this issue 3 years ago • 0 comments

Today, I've been staging some PowerShell files in Git via Rider (I have Git staging area enabled, but not sure how important that is), and Rider's been frozen for about 14 seconds.

Seemingly, the issue is in Git which have been doing some synchronous processing of files, which triggered (and… crashed?) PowerShell LSP server. I'll attach the relevant segment of the logs, and attach the freeze dumps.

dump+logs.zip

I wasn't able to reproduce the issue for a second time, but still: if it's possible to somehow circumvent this in the plugin code (say, not do synchronous reconnection to LSP on a document change), it would be good (and if not, feel free to close the issue; I don't mind).

The freeze stack trace is:

	at [email protected]/java.lang.ProcessImpl.waitForTimeoutInterruptibly(Native Method)
	at [email protected]/java.lang.ProcessImpl.waitFor(ProcessImpl.java:569)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.EditorServicesLanguageHostStarter.checkOutput(EditorServicesLanguageHostStarter.kt:265)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.EditorServicesLanguageHostStarter.startServerSession(EditorServicesLanguageHostStarter.kt:253)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.EditorServicesLanguageHostStarter.establishConnection(EditorServicesLanguageHostStarter.kt:129)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.scheduleStart(LanguageServerEndpoint.kt:250)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.checkStarted(LanguageServerEndpoint.kt:219)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.connectEditor(LanguageServerEndpoint.kt:114)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.connectEditor(LanguageServerEndpoint.kt:428)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.crashed(LanguageServerEndpoint.kt:418)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.crashed(LSPRequestManager.kt:45)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.didClose(LSPRequestManager.kt:31)
	at com.intellij.plugin.powershell.lang.lsp.ide.EditorEventManager.documentClosed(EditorEventManager.kt:96)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.disconnectEditor(LanguageServerEndpoint.kt:207)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.stop(LanguageServerEndpoint.kt:174)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.crashed(LanguageServerEndpoint.kt:416)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.crashed(LSPRequestManager.kt:45)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.didClose(LSPRequestManager.kt:31)
	at com.intellij.plugin.powershell.lang.lsp.ide.EditorEventManager.documentClosed(EditorEventManager.kt:96)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.disconnectEditor(LanguageServerEndpoint.kt:207)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.stop(LanguageServerEndpoint.kt:174)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.crashed(LanguageServerEndpoint.kt:416)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.crashed(LSPRequestManager.kt:45)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.didClose(LSPRequestManager.kt:31)
	at com.intellij.plugin.powershell.lang.lsp.ide.EditorEventManager.documentClosed(EditorEventManager.kt:96)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.disconnectEditor(LanguageServerEndpoint.kt:207)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.stop(LanguageServerEndpoint.kt:174)
	at com.intellij.plugin.powershell.lang.lsp.languagehost.LanguageServerEndpoint.crashed(LanguageServerEndpoint.kt:416)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.crashed(LSPRequestManager.kt:45)
	at com.intellij.plugin.powershell.lang.lsp.ide.LSPRequestManager.didChange(LSPRequestManager.kt:52)
	at com.intellij.plugin.powershell.lang.lsp.ide.EditorEventManager.documentChanged(EditorEventManager.kt:138)
	at com.intellij.plugin.powershell.lang.lsp.ide.listeners.DocumentListenerImpl.documentChanged(DocumentListenerImpl.kt:24)
	at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:916)
	at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:820)
	at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:660)
	at com.intellij.openapi.editor.impl.DocumentImpl.replaceText(DocumentImpl.java:527)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$3.run(FileDocumentManagerImpl.java:702)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$reloadFromDisk$6(FileDocumentManagerImpl.java:688)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$$Lambda$2972/0x000000010200e840.run(Unknown Source)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.reloadFromDisk(FileDocumentManagerImpl.java:688)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.contentsChanged(FileDocumentManagerImpl.java:668)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$MyAsyncFileListener$1.afterVfsChange(FileDocumentManagerImpl.java:609)
	at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.afterVfsChange(AsyncEventSupport.java:139)
	at com.intellij.openapi.vfs.newvfs.AsyncEventSupport$1.after(AsyncEventSupport.java:70)
	at [email protected]/java.lang.invoke.DirectMethodHandle$Holder.invokeInterface(DirectMethodHandle$Holder)
	at [email protected]/java.lang.invoke.LambdaForm$MH/0x000000010104c040.invoke(LambdaForm$MH)
	at [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000100973040.invokeExact_MT(LambdaForm$MH)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:674)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:649)
	at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:422)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:397)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:379)
	at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
	at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:185)
	at com.sun.proxy.$Proxy142.after(Unknown Source)
	at git4idea.index.vfs.GitIndexFileSystemRefresher$RefreshSession.apply(GitIndexFileSystemRefresher.kt:153)
	at git4idea.index.vfs.GitIndexFileSystemRefresher$refresh$refresh$1$1.invoke(GitIndexFileSystemRefresher.kt:68)
	at git4idea.index.vfs.GitIndexFileSystemRefresher$refresh$refresh$1$1.invoke(GitIndexFileSystemRefresher.kt:29)
	at git4idea.index.vfs.GitIndexFileSystemRefresherKt$writeInEdt$1$1.run(GitIndexFileSystemRefresher.kt:162)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at git4idea.index.vfs.GitIndexFileSystemRefresherKt$writeInEdt$1.run(GitIndexFileSystemRefresher.kt:161)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
	at com.intellij.openapi.application.impl.ApplicationImpl$$Lambda$324/0x00000001004f5c40.run(Unknown Source)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
	at [email protected]/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at [email protected]/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at [email protected]/java.awt.EventQueue$4.run(EventQueue.java:727)
	at [email protected]/java.awt.EventQueue$4.run(EventQueue.java:721)
	at [email protected]/java.security.AccessController.doPrivileged(Native Method)
	at [email protected]/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at [email protected]/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:973)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.ide.IdeEventQueue$$Lambda$557/0x000000010091d440.compute(Unknown Source)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.ide.IdeEventQueue$$Lambda$552/0x0000000100919c40.run(Unknown Source)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
	at [email protected]/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at [email protected]/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at [email protected]/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at [email protected]/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at [email protected]/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at [email protected]/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

ForNeVeR avatar Mar 02 '21 16:03 ForNeVeR