Sonarcloud cFamily Relocation Error

Dear sir or madam,

we successfully ran sonarcloud within our bitbucket pipeline. Suddenly we are getting a relocation error saying

/opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8034522576191866868/subprocess: relocation error: /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8034522576191866868/libseam.so: symbol clock_gettime version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
INFO: Requesting reproducer for: /opt/atlassian/pipelines/agent/build/src/platform_info.c
/opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8034522576191866868/subprocess: relocation error: /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8034522576191866868/libseam.so: symbol clock_gettime version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
ERROR: Exception in thread pool-3-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /opt/atlassian/pipelines/agent/build/src/ARYA/Debug/../src/comm/platform_info.c
	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)

In the file where the error occurs there is no call to the gettime function. What can we do to overcome the issue? Unfortunately I also don’t have direct access to the sonar-cfamily-reproducer.zip since the sonarcloud CLI runs on docker. I can try to trigger it from my host to provide more information if needed.

1 Like

This issue seems to be linked with: Bug: sonar-scanner libseam glibc error (clock_gettime not defined) - #2 by ErikT

Hi,

We are also experiencing the same issue since yesterday.
It’s always on the same file. I tried excluding the file and now it’s another file that’s failing.

/opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8047209568014222621/subprocess: relocation error: /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/8047209568014222621/libseam.so: symbol clock_gettime version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
ERROR: Exception in thread pool-4-thread-4
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /opt/atlassian/pipelines/agent/build/build/../main.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)

I can share in DM the .zip

Thanks for the help

1 Like

Thank you all for your report, we created a ticket on our side CPP-3238, we are going to investigate it on our side, I am going to come back to you with more requests if needed.

CFamily plugin is going to be reverted on SonarCloud by the end of the day, see the incident report: SonarCloud Status - Some customers cannot start the Analysis Computation on the C-family languages.

2 Likes

Hello,

The fix has been successfully deployed to production and the services are up. Please test and confirm.

Best regards,
Silviu

1 Like

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