Open fzakaria opened 4 months ago
Hi @fzakaria, Is there a way we can reproduce the above usecase at our end.
@sgowroji I will see if i can build a reproduction;
I noticed it explicitly if i was doing //...
and if I had multiple error-prone warnings.
Building smaller number of targets seemed to have worked around the issue.
(Or just constantly doing bazel shutdown
)
It's now happening very often even with smaller targets like "//something/..." with also another exception:
ERROR: /Users/fzakaria/code/github.com/confluentinc/ce-kafka/streams/integration-tests/BUILD.bazel:148:21: Building streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StreamsUncaughtExceptionHandlerIntegrationTest-class.jar (1 source file) failed: (Exit 1): java failed: error executing Javac command (from target //streams/integration-tests:src/test/java/org/apache/kafka/streams/integration/StreamsUncaughtExceptionHandlerIntegrationTest) external/remotejdk21_macos_aarch64/bin/java '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 19 arguments skipped)
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StreamsUncaughtExceptionHandlerIntegrationTest.java:196: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
this.context = context;
^
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.23.0
BugPattern: SelfAssignment
Stack Trace:
java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.tree.JCTree$JCMethodDecl.getParameters()" because the return value of "com.google.errorprone.util.ASTHelpers.findEnclosingNode(com.sun.source.util.TreePath, java.lang.Class)" is null
at com.google.errorprone.bugpatterns.ReplacementVariableFinder.fixesByReplacingExpressionWithMethodParameter(ReplacementVariableFinder.java:88)
at com.google.errorprone.bugpatterns.SelfAssignment.describeForAssignment(SelfAssignment.java:204)
at com.google.errorprone.bugpatterns.SelfAssignment.matchAssignment(SelfAssignment.java:83)
at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
at com.google.errorprone.scanner.ErrorProneScanner.visitAssignment(ErrorProneScanner.java:504)
at com.google.errorprone.scanner.ErrorProneScanner.visitAssignment(ErrorProneScanner.java:150)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:2070)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
at jdk.compiler/com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:503)
at com.google.errorprone.scanner.ErrorProneScanner.visitExpressionStatement(ErrorProneScanner.java:633)
at com.google.errorprone.scanner.ErrorProneScanner.visitExpressionStatement(ErrorProneScanner.java:150)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1611)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
The crash is an Error Prone bug that I will fix: https://github.com/google/error-prone/issues/4812
This also seems to be showing a number of issues with the JavaBuilder worker and with worker error handling, I'd expect that crash to cause the build to stop and report an error, instead of hanging or logging that stack trace as hex
Description of the bug:
My builds seem to hang as I go through fixing errorprone bug fixes. When I hit ctrl-c it dumps out a stack-trace:
Running
bazel shutdown
seems to fix the issue; so it's some weird in memory bug.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
MacOS
What is the output of
bazel info release
?7.4.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response