Thank you for providing the logs and your Jenkins configuration details.
I have reviewed the files, and at first glance, I don’t see anything obviously abnormal. While some files take quite a bit of time to analyze, this is generally expected for a codebase of this size.
However, I noticed that the file /src/main/java/jet/phoenix/ui/task/invoice/InputInvoiceNut3.java consistently appears at the very end of the logs.
Could you tell me if there is anything specific about this file? For example:
Is it exceptionally large or does it contain a very high number of methods/variables?
Is it auto-generated?
Does it have any “remarkable” or unique structural characteristics compared to the rest of the project?
Thank you for these additional details. Knowing the file size and the fact that it isn’t auto-generated is very helpful for my investigation.
To help me narrow this down further, would you be able to try running the analysis on this file alone? I’m curious to see if it still triggers the same memory error when isolated, or if the crash only occurs during the full project analysis.
When running the analysis on only InputInvoiceNut3.java I do not get the error.
I added -pl .,jet.phoenix.base to specifi only the module I want. And sonar.sources=src/main/java/jet/phoenix/ui/task/invoice/InputInvoiceNut3.java to limit to the single file.
This should theoretically force the file into your Jenkins workspace root. I don’t use Jenkins myself, so I can’t assist much more with its specific interface or configuration, but once it crashes, you should hopefully be able to find and download the file from the “Workspace” section of the job.
If this doesn’t work as expected, I’d recommend searching the Jenkins documentation for “retrieving workspace files,” as my expertise with the platform is quite limited.
So far I am unable to get the hprof file to be produced. However in the last run I did get this message which seemed relevant :
[ERROR] [stderr] Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Report about progress of Java AST analyzer"
In the previous run that also failed I got this message :
[INFO] Did not optimize analysis for any files, performed a full analysis for all 7900 files.
I have added the file argument in the sonar.properties file as well. I am still struggling to figure out which process is running out of memory. So I am unsure if these dump file arguments are getting into the process in question. I say this as no process seems to reach the 4Gb limit set in these arguments.