Errors in Jenkins after upgrading from 7.9 to 8.9

We just upgraded our developer edition from 7.9 to 8.9.6 and now we are seeing errors in Jenkins.

  • SonarQube developer 8.9.6
  • Nothing tried since the upgrade

I am seeing these errors in the jenkins job logs:

11:21:21  [INFO] 209 source files to be analyzed
11:21:32  [INFO] 27/209 files analyzed, current file: src/main/java/com/sony/snei/wallet/resource/csi/v2/CsrWalletsController.java
11:21:37  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:21:37  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:21:37  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:21:42  [INFO] 55/209 files analyzed, current file: src/main/java/com/sony/snei/wallet/resource/WalletsResource.java
11:21:51  [INFO] 98/209 files analyzed, current file: src/main/java/com/sony/snei/wallet/sqs/WalletSqsEventConsumer.java
11:21:55  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:22:02  [INFO] 133/209 files analyzed, current file: src/main/java/com/sony/snei/wallet/resource/WalletsInstrumentResource.java
11:22:05  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:22:05  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:22:10  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:22:11  [INFO] 174/209 files analyzed, current file: src/main/java/com/sony/snei/wallet/status/WalletServiceExampleStatusCheckProvider.java
11:22:18  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException
11:22:20  Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods java.lang.NullPointerException

Hi,

Would it be possible to provide a concise reproducer? I.e. a cut-down version of one or more of these files that produces the same error?

 
Ann

I’ll look for another project that has the same issues.

I am also seeing this in the logs:

11:22:21 [INFO] 209/209 source files have been analyzed
11:22:21 [INFO] Slowest analyzed files:
11:22:21 src/main/java/com/sony/snei/wallet/resource/WalletHelper.java (3032ms, 112215B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/csi/v2/CsiWalletsCoreResource.java (2906ms, 147093B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/CsProductHelperProvider.java (1900ms, 21468B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/WalletsInstrumentResource.java (1729ms, 89025B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/WalletsResource.java (1313ms, 33329B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/WalletsTransactionResource.java (1222ms, 54865B)
11:22:21 src/main/java/com/sony/snei/wallet/resource/federated/LedgerStatus.java (1159ms, 636B)
11:22:21 src/main/java/com/sony/snei/wallet/accountClosure/handler/AccountClosurePendingHandler.java (1113ms, 6278B)
11:22:21 src/main/java/com/sony/snei/wallet/configuration/AutoReloadProperties.java (1073ms, 96146B)
11:22:21 [INFO] Java Main Files AST scan (done) | time=59318ms

Could I have missed a step in the upgrade that is resulting in this issue ?

Hi,

No, that’s not likely.

In fact, we’ve worked on analysis performance since the LTS whatever’s causing your slowness may have already been addressed by now.

Would it be possible for you to stage a 9.5 instance & analyze this project on it?

 
Ann

I can stage a 9.5 version, but will need to look into how to move the analysis to this version, could take some time.

Do you have any other suggestion on how to debug this issue ?

Hi,

There are a few things to look at:

  • Are you running analysis with Java 8 or Java 11 (Java 11 may get you some improvement)
  • Are you analyzing on Linux? We’ve seen some slowdowns on Windows IIRC
  • Are there any NFS volumes involved?
  • Does the project use a lot of libraries? (If so, are there any that are cruft & could be cleaned out?)

 
Ann

Ann,

We are running Java11 on Linux, no NFS volumes and there’s not a lot of libraries. Didn’t have any issues with 7.9 version of SonarQube, something just does not seem right.

Hi,

Keep in mind that the analyzer functionality advances significantly between LTS versions. Sometimes, with the advances in what we can detect come speed hits on that detection. And at the same time, we’ve been working on speed of analysis in the 9-series, and found ways to speed up Java analysis significantly. Why is why I asked you to check it out on 9.5.

If you can replicate the same problem on 9.5, then it’s something we can look at fixing, with a chance - depending on severity - that it might be back-ported to the LTS. If you can’t replicate it on 9.5, then… well, we’ve already fixed it.

 
Ann