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

Infinite loop in CompletionProposalTools.getScoreOfFilterMatchHelper #1132

Open
apupier opened this issue Oct 3, 2024 · 2 comments
Open

Comments

@apupier
Copy link
Contributor

apupier commented Oct 3, 2024

Infinite loop in CompletionProposalTools.getScoreOfFilterMatchHelper (or at least 20 minutes looping in it)

I do not know how to reproduce.
Language Server Protocol client for Eclipse IDE (Incubation) 0.18.10.202405280703 org.eclipse.lsp4e
in Eclipse Version: 2024-06 (4.32.0) Build id: 20240606-1231

org.eclipse.lsp4e.operations.completion.CompletionProposalTools.lengthOfPrefixMatch(CompletionProposalTools.java:193)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:165)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatch(CompletionProposalTools.java:149)
org.eclipse.lsp4e.operations.completion.LSCompletionProposal.getRankScore(LSCompletionProposal.java:212)
org.eclipse.lsp4e.operations.completion.LSCompletionProposalComparator.compare(LSCompletionProposalComparator.java:42)
org.eclipse.lsp4e.operations.completion.LSCompletionProposalComparator.compare(LSCompletionProposalComparator.java:1)
[email protected]/java.util.TimSort.binarySort(TimSort.java:296)
[email protected]/java.util.TimSort.sort(TimSort.java:239)
[email protected]/java.util.Arrays.sort(Arrays.java:1234)
org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:169)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$10(AsyncCompletionProposalPopup.java:378)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda/0x00007f2bed277908.run(Unknown Source)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$9(AsyncCompletionProposalPopup.java:377)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda/0x00007f2bed2776e8.get(Unknown Source)
[email protected]/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[email protected]/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
[email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[email protected]/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[email protected]/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[email protected]/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:179)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatchHelper(CompletionProposalTools.java:169)
org.eclipse.lsp4e.operations.completion.CompletionProposalTools.getScoreOfFilterMatch(CompletionProposalTools.java:149)
org.eclipse.lsp4e.operations.completion.LSCompletionProposal.getRankScore(LSCompletionProposal.java:212)
org.eclipse.lsp4e.operations.completion.LSCompletionProposalComparator.compare(LSCompletionProposalComparator.java:42)
org.eclipse.lsp4e.operations.completion.LSCompletionProposalComparator.compare(LSCompletionProposalComparator.java:1)
[email protected]/java.util.TimSort.binarySort(TimSort.java:296)
[email protected]/java.util.TimSort.sort(TimSort.java:239)
[email protected]/java.util.Arrays.sort(Arrays.java:1234)
org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:169)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$10(AsyncCompletionProposalPopup.java:378)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda/0x00007f2bed277908.run(Unknown Source)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$9(AsyncCompletionProposalPopup.java:377)
org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup$$Lambda/0x00007f2bed2776e8.get(Unknown Source)
[email protected]/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[email protected]/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
[email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[email protected]/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[email protected]/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[email protected]/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
@BoykoAlex
Copy link
Contributor

Can't see how CompletionProposalTools.getScoreOfFilterMatchHelper(..) can loop forever... Are you getting stack overflow eventually?
Any chance you can turn on boot ls logs as well? Wonder how many completion proposals the LS has sent out... Also did you invoke content assists and continue typing while completions are showing to narrow down the list of completions?

@apupier
Copy link
Contributor Author

apupier commented Oct 4, 2024

Can't see how CompletionProposalTools.getScoreOfFilterMatchHelper(..) can loop forever... Are you getting stack overflow eventually?

no, I killed it after 30 minutes

Also did you invoke content assists and continue typing while completions are showing to narrow down the list of completions?

I do not remember exactly. I was doing several things in parallel and was switching between windows, I realized that my fan was at max speed and so looked which process was taking the CPU to the max.

If just the stacktrace is not enough to guide more I guess we can close the issue for now. If I'm able to reproduce maybe we would be able to narrow down the use case and I would reopen at that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants