Sonarqube 9.8 - sonar-scanner fails w/eslint-bridge unresponsive error

Must-share information:

  • SonarQube Enterprise 9.8
  • sonar-scanner.bat execution on Javascript code is failing w/eslint-bridge error

Hello, my enterprise has updated to sonarqube 9.8 in our staging setup. I ran an existing code base that is passing on SonarQube 9.7.1, but it is now failing with the following error:

13:40:37 ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).
... <cli that I scrubbed due to security requirements, if you need it I can provide privately>
13:40:38  java.lang.IllegalStateException: eslint-bridge is unresponsive

So I bumped the maxspace as indicated to 4096, that made no difference. Then I bumped it again to 8192, and that still failed. Considering this was working fine in 9.7.1, I believe there may be something wrong in the 9.8 release.

If you have suggestions for things to try next please let me know.

Hi @FBNitro, thanks for raising this problem to our attention. Could you send us the sonar scanner logs, please?
Thanks and Regards
François

I’ve asked someone that’s more on the backend tooling side in the organization to reach out

Hi, did you manage to fix this problem?

We have a work around for now, we reverted the javascript scanner to the previous version and the folks that deal with tooling in my company are in contact with SQ.

Hi @francois.mora ,

We are using Sonar Community Version 9.8 and facing the same issues with our projects.

Please see below log snippet:

|error|23-Jan-2023 09:55:26|ERROR: |
|---|---|---|
|error|23-Jan-2023 09:55:26|ERROR: <--- Last few GCs --->|
|error|23-Jan-2023 09:55:26|ERROR: |
|error|23-Jan-2023 09:55:26|ERROR: [13726:0x5daf170]   360310 ms: Scavenge (reduce) 2038.3 (2048.0) -> 2037.5 (2049.0) MB, 19.7 / 0.0 ms  (average mu = 0.171, current mu = 0.007) allocation failure |
|error|23-Jan-2023 09:55:26|ERROR: [13726:0x5daf170]   360474 ms: Scavenge (reduce) 2038.5 (2048.0) -> 2037.6 (2049.0) MB, 5.9 / 0.0 ms  (average mu = 0.171, current mu = 0.007) allocation failure |
|error|23-Jan-2023 09:55:26|ERROR: [13726:0x5daf170]   360626 ms: Scavenge (reduce) 2038.4 (2048.0) -> 2037.6 (2049.0) MB, 15.2 / 0.0 ms  (average mu = 0.171, current mu = 0.007) task |
|error|23-Jan-2023 09:55:26|ERROR: |
|error|23-Jan-2023 09:55:26|ERROR: |
|error|23-Jan-2023 09:55:26|ERROR: <--- JS stacktrace --->|
|error|23-Jan-2023 09:55:26|ERROR: |
|error|23-Jan-2023 09:55:26|ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory|
|error|23-Jan-2023 09:55:26|ERROR:  1: 0xa3ac10 node::Abort() [node]|
|error|23-Jan-2023 09:55:26|ERROR:  2: 0x970199 node::FatalError(char const*, char const*) [node]|
|error|23-Jan-2023 09:55:26|ERROR:  3: 0xbba5ce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]|
|error|23-Jan-2023 09:55:26|ERROR:  4: 0xbba947 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]|
|error|23-Jan-2023 09:55:26|ERROR:  5: 0xd76b65  [node]|
|error|23-Jan-2023 09:55:26|ERROR:  6: 0xd776ef  [node]|
|error|23-Jan-2023 09:55:26|ERROR:  7: 0xd8552b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]|
|error|23-Jan-2023 09:55:26|ERROR:  8: 0xd890ec v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]|
|error|23-Jan-2023 09:55:26|ERROR:  9: 0xd577cb v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]|
|error|23-Jan-2023 09:55:26|ERROR: 10: 0x109fee0 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [node]|
|error|23-Jan-2023 09:55:26|ERROR: 11: 0x1448f99  [node]|
|error|23-Jan-2023 09:55:27|ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).|
|error|23-Jan-2023 09:55:27|ERROR: Failure during analysis, Node.js command to start eslint-bridge was: node /home/bamboo/bamboo-agent-home/xml-data/build-dir/WKDE-WKOUI-SS/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 44463 127.0.0.1 /home/bamboo/bamboo-agent-home/xml-data/build-dir/WKDE-WKOUI-SS/.scannerwork true false |
|error|23-Jan-2023 09:55:27|java.lang.IllegalStateException: eslint-bridge is unresponsive|

Please let me know if you need any more logs to check.

Hi @Harmeet, thanks for the logs. Could you create a separate topic with the full logs, please?