Bitbucket Pipeline Failing - Relocation Error

Hello,

The following error occurs in the BitbucketCloud SonarCloud analysis:

/opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/13256862189257081105/subprocess: relocation error: /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/13256862189257081105/libseam.so: symbol clock_gettime version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
/opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/13256862189257081105/subprocess: relocation error: /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/13256862189257081105/libseam.so: symbol clock_gettime version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
11:30:54.535 ERROR: Exception in thread pool-3-thread-4
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /opt/atlassian/pipelines/agent/build/src/<path-to-file>.cpp
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:132)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:52)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:129)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:52)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$12(CFamilySensor.java:718)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Final SonarCloud output:

11:30:56.824 ERROR: 
An error occurred while analyzing the following compilation unit: 
  /opt/atlassian/pipelines/agent/build/src/<path-to-file>.cpp
A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
  /opt/atlassian/pipelines/agent/build/sonar-cfamily-reproducer.zip
11:30:57.447 INFO: ------------------------------------------------------------------------
11:30:57.447 INFO: EXECUTION FAILURE
11:30:57.447 INFO: ------------------------------------------------------------------------
11:30:57.448 INFO: Total time: 1:58.178s
11:30:57.586 ERROR: Error during SonarScanner execution
11:30:57.586 INFO: Final Memory: 106M/360M
11:30:57.586 INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: 
An error occurred while analyzing the following compilation unit: 
  /opt/atlassian/pipelines/agent/build/src/<path-to-file>.cpp
A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
  /opt/atlassian/pipelines/agent/build/sonar-cfamily-reproducer.zip
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:427)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:177)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:45)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:445)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:441)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:399)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

I cannot access sonar-cfamily-reproducer.zip as it was created in a Bitbucket Cloud pipeline directory. Sonar version used: 4.4.0.2170. Thank you.

Hi @dorothyk ,

thank you for the report, it should be working now, see the incident report and its related bug CPP-3238.

1 Like

It is, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.