Description
Analysis hangs on the 2nd or 3rd consecutive run, consistently getting stuck around the same rule. The first analysis run always succeeds. Stopping and restarting the analysis server resolves the issue — subsequent runs succeed again until the pattern repeats.
Status: Needs Verification
Note: This was reported by a user. The root cause may be in the Java provider binary rather than the IDE extension, but we should track and handle it on our end (e.g., detection, timeout, automatic recovery, better error reporting). We do not currently have access to the project directory or rules that triggered this, so a first step will be finding a reproducer.
Key Observations from Logs
-
RPC connection dies: "Pending response rejected since connection got disposed" — the pipe from the RPC layer to the Java extension is breaking.
-
File walk failure: failed to search for files ... error="failed to walk all dirs - lstat : no such file or directory" — the Java provider fails to walk the project directory on subsequent runs.
-
Unbounded search scope: "could not construct dep label selector from condition context, search scope will not be limited" — the label selector is empty/invalid, causing the provider to search through open source dependencies unnecessarily. This may contribute to memory pressure.
Hypotheses Under Investigation
- Memory leak / exhaustion: The incorrect label selector causes the provider to search through far more code than necessary. Across repeated analysis runs (with the Java provider, jdtls, and RPC server all staying up as expected), accumulated memory pressure could cause the provider to crash or the RPC connection to break.
- Stale state accumulation: The Java provider or jdtls may accumulate stale internal state across analysis runs that eventually causes failures, even though they remain running.
- File system state changes: The build tool may create settings/project files after the first run that cause
lstat failures on subsequent file walks (e.g., symlinks, temporary files).
Workaround
Stopping and restarting the analysis server before re-running analysis resolves the issue every time.
Expected Behavior
Analysis should complete reliably on consecutive runs without needing to restart the analysis server. If the Java provider encounters an error, the extension should detect the failure and either recover automatically or surface a clear error to the user rather than hanging indefinitely.
Description
Analysis hangs on the 2nd or 3rd consecutive run, consistently getting stuck around the same rule. The first analysis run always succeeds. Stopping and restarting the analysis server resolves the issue — subsequent runs succeed again until the pattern repeats.
Status: Needs Verification
Key Observations from Logs
RPC connection dies:
"Pending response rejected since connection got disposed"— the pipe from the RPC layer to the Java extension is breaking.File walk failure:
failed to search for files ... error="failed to walk all dirs - lstat : no such file or directory"— the Java provider fails to walk the project directory on subsequent runs.Unbounded search scope:
"could not construct dep label selector from condition context, search scope will not be limited"— the label selector is empty/invalid, causing the provider to search through open source dependencies unnecessarily. This may contribute to memory pressure.Hypotheses Under Investigation
lstatfailures on subsequent file walks (e.g., symlinks, temporary files).Workaround
Stopping and restarting the analysis server before re-running analysis resolves the issue every time.
Expected Behavior
Analysis should complete reliably on consecutive runs without needing to restart the analysis server. If the Java provider encounters an error, the extension should detect the failure and either recover automatically or surface a clear error to the user rather than hanging indefinitely.