Closed dashorst closed 8 months ago
Looking at the first thread dump, the following block repeats more than what would look healthy:
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.cachedResolvedCopy(LambdaExpression.java:992)
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveExpressionExpecting(LambdaExpression.java:1023)
at org.eclipse.jdt.internal.compiler.lookup.ConstraintExpressionFormula.inputVariables(ConstraintExpressionFormula.java:513)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.lambda$1(InferenceContext18.java:601)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18$$Lambda$1319/0x00000008012c1fd0.perform(Unknown Source)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.collectingInnerBounds(InferenceContext18.java:535)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.addJDK_8153748ConstraintsFromFunctionalExpr(InferenceContext18.java:601)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.addJDK_8153748ConstraintsFromExpression(InferenceContext18.java:571)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.addJDK_8153748ConstraintsFromInvocation(InferenceContext18.java:556)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.inferInvocationType(InferenceContext18.java:421)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod18(ParameterizedGenericMethodBinding.java:271)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod(ParameterizedGenericMethodBinding.java:92)
at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Scope.java:841)
at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Scope.java:798)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod0(Scope.java:1753)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1654)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:3044)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:1020)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:835)
at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:337)
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:456)
I could not find recent changes in refactoring that could have led to this.
Thus we likely have a "normal" compiler bug. We can see that a lambda was involved which calls a generic method and perhaps more levels of nesting to thoroughly challenge type inference. It's strange if this bug doesn't surface during regular compilation, perhaps it does?
Unfortunately, that's about where analysis based only on the stack trace stops.
ERGO: a reproducing example would seem necessary for analysis.
There's some similarity to https://bugs.eclipse.org/540763
@dashorst please provide a reproducer
There is not enough information provided to work on this issue. Please reopen if you can give reproducing steps.
While saving a file and letting Eclipse (2022.3) do its thing (saving, clean up, compiling) the editor of the file went blank and the GC started running awry. I was able to attach a Visual VM to the process and take two stack traces with about 1 minute time difference between one another.
I have no idea what code triggered this infinite loop, but I hope the stack traces will provide some clarity to the maintainers.
Update: Apparently I was renaming a method in a class. Also noteworthy: I had "Build automatically" turned off.
threaddump-1649936938159.tdump.txt
threaddump-1649937007990.tdump.txt
Apparently I was renaming something (a class name?) (using CTRL-1) when this infinite loop was triggered.