SonarQube Community 9.8 - scanner fails with error "eslint-bridge Node.js process is unresponsive"

Version: SonarQube Community 9.8

Existing Code/Project Scan which was passing in the previous Sonar version is now failing with below error:

|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 /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|

So as suggested in the logs, we bumped the maxspace as indicated to 4096, which made no difference. Then we bumped it again to 8192, and that still failed.

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

Hi @Harmeet, thanks for the topic. To understand what could lead to this out-of-memory error, could you please share the entirety of the scanner logs where this error stack trace appears?