could you please share the full analysis log and not just the final stacktrace?
could you please share the full analysis log and not just the final stacktrace?
How can I attach files to a topic?
Or alternatively, I could send an email, but not sure what email address to use.
Found it… scan-output.txt (30.6 KB)
Could you please rerun the specifying this additional parameter?
It should create a file named
sonar-cfamily.reproducer in the project folder which you should share with me to help in the investigation, send it privately if it contains sensitive information.
Didn’t really work:
E:\Jenkins\Slave\workspace\cc_prs>e:\Tools\sonar-scanner-22.214.171.1242-windows\bin\sonar-scanner.bat sonar.cfamily.reproducer=e:/Jenkins/Slave/workspace/cc_prs/src/implement/diag_cfg.c -X
20:56:06.713 INFO: Scanner configuration file: e:\Tools\sonar-scanner-126.96.36.1992-windows\bin…\conf\sonar-scanner.properties
20:56:06.723 INFO: Project root configuration file: E:\Jenkins\Slave\workspace\cc_prs\sonar-project.properties
20:56:06.741 INFO: SonarQube Scanner 188.8.131.522
20:56:06.742 INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
20:56:06.744 INFO: Windows NT (unknown) 10.0 amd64
20:56:06.904 DEBUG: keyStore is :
20:56:06.905 DEBUG: keyStore type is : jks
20:56:06.906 DEBUG: keyStore provider is :
20:56:06.908 DEBUG: init keystore
20:56:06.909 DEBUG: init keymanager of type SunX509
20:56:07.058 DEBUG: Create: C:\Users\Administrator.sonar\cache
20:56:07.061 INFO: User cache: C:\Users\Administrator.sonar\cache
20:56:07.062 DEBUG: Create: C:\Users\Administrator.sonar\cache_tmp
20:56:07.067 DEBUG: Extract sonar-scanner-api-batch in temp…
20:56:07.088 DEBUG: Get bootstrap index…
20:56:07.088 DEBUG: Download: http://kvmech.myserver/sonarqube/batch/index
20:56:07.168 DEBUG: Get bootstrap completed
20:56:07.199 DEBUG: Create isolated classloader…
20:56:07.209 DEBUG: Start temp cleaning…
20:56:07.217 DEBUG: Temp cleaning done
20:56:07.218 DEBUG: Execution getVersion
20:56:07.223 INFO: SonarQube server 7.6.0
20:56:07.227 DEBUG: Execution execute
20:56:07.636 INFO: Load global settings
20:56:07.832 DEBUG: GET 200 http://kvmech.myserver/sonarqube/api/settings/values.protobuf | time=186ms
20:56:07.863 INFO: Load global settings (done) | time=229ms
20:56:07.867 INFO: Server id: 49B321BC-15e61e72daf081c
20:56:07.890 INFO: User cache: C:\Users\Administrator.sonar\cache
20:56:08.118 INFO: Load/download plugins
20:56:08.118 INFO: Load plugins index
20:56:08.159 DEBUG: GET 200 http://kvmech.myserver/sonarqube/api/plugins/installed | time=40ms
20:56:08.201 INFO: Load plugins index (done) | time=83ms
20:56:08.281 DEBUG: Download plugin ‘scmmercurial’ to ‘C:\Users\Administrator.sonar_tmp\fileCache7460141700642485360.tmp’
20:56:08.291 DEBUG: GET 200 http://kvmech.myserver/sonarqube/api/plugins/download?plugin=scmmercurial&acceptCompressions=pack200 | time=9ms
20:56:09.244 INFO: Load/download plugins (done) | time=1126ms
20:56:09.537 DEBUG: Plugins:
20:56:09.538 DEBUG: * SonarCSS 184.108.40.2064 (cssfamily)
20:56:09.539 DEBUG: * Svn 220.127.116.115 (scmsvn)
20:56:09.539 DEBUG: * SonarPLSQL 18.104.22.1683 (plsql)
20:56:09.540 DEBUG: * SonarScala 22.214.171.124 (sonarscala)
20:56:09.541 DEBUG: * SonarC# 126.96.36.19996 (csharp)
20:56:09.541 DEBUG: * Vulnerability Analysis 188.8.131.5234 (security)
20:56:09.542 DEBUG: * SonarJava 184.108.40.20622 (java)
20:56:09.543 DEBUG: * LDAP 220.127.116.118 (ldap)
20:56:09.543 DEBUG: * SonarHTML 18.104.22.1685 (web)
20:56:09.544 DEBUG: * SonarFlex 22.214.171.1242 (flex)
20:56:09.545 DEBUG: * SonarXML 126.96.36.1990 (xml)
20:56:09.546 DEBUG: * SonarTS 188.8.131.5266 (typescript)
20:56:09.546 DEBUG: * SonarVB 184.108.40.20696 (vbnet)
20:56:09.549 DEBUG: * SonarSwift 220.127.116.1187 (swift)
20:56:09.549 DEBUG: * SonarCFamily 18.104.22.16816 (cpp)
20:56:09.550 DEBUG: * SonarPython 22.214.171.1243 (python)
20:56:09.550 DEBUG: * JaCoCo 126.96.36.199 (jacoco)
20:56:09.551 DEBUG: * Mercurial 1.1.2 (scmmercurial)
20:56:09.552 DEBUG: * SonarGo 188.8.131.522 (go)
20:56:09.552 DEBUG: * SonarKotlin 184.108.40.206 (kotlin)
20:56:09.553 DEBUG: * SonarTSQL 220.127.116.1167 (tsql)
20:56:09.554 DEBUG: * SonarRuby 18.104.22.168 (ruby)
20:56:09.555 DEBUG: * Vulnerability Rules for C# 22.214.171.12434 (securitycsharpfrontend)
20:56:09.555 DEBUG: * Vulnerability Rules for Java 126.96.36.19934 (securityjavafrontend)
20:56:09.556 DEBUG: * License for SonarLint 7.6 (license)
20:56:09.556 DEBUG: * Git 188.8.131.521 (scmgit)
20:56:09.559 DEBUG: * SoftVis3D Sonar plugin 1.0.1 (softvis3d)
20:56:09.559 DEBUG: * SonarPHP 184.108.40.20655 (php)
20:56:09.560 DEBUG: * SonarABAP 220.127.116.113 (abap)
20:56:09.561 DEBUG: * Vulnerability Rules for PHP 18.104.22.16834 (securityphpfrontend)
20:56:09.562 DEBUG: * SVG Badges 3.0.1 (status)
20:56:09.586 INFO: Loaded core extensions: branch-scanner
20:56:09.642 INFO: ------------------------------------------------------------------------
20:56:09.643 INFO: EXECUTION FAILURE
20:56:09.644 INFO: ------------------------------------------------------------------------
20:56:09.644 INFO: Total time: 2.961s
20:56:09.717 INFO: Final Memory: 16M/256M
20:56:09.717 INFO: ------------------------------------------------------------------------
20:56:09.719 ERROR: Error during SonarQube Scanner execution
20:56:09.719 ERROR: Tasks support was removed in SonarQube 7.6.
I guess, this is not what you were/are expecting…
The above was generated with the following line:
e:\Tools\sonar-scanner-22.214.171.1242-windows\bin\sonar-scanner.bat sonar.cfamily.reproducer=e:/Jenkins/Slave/workspace/cc_prs/src/implement/diag_cfg.c -X
I was not sure where to add this extra parameter, so I added at the command line.
Seeing the error (“Tasks support was removed…”) I though maybe it should not be a command line parameter, but an extra line in the sonar-project.properties file.
After adding the extra line into sonar-project.properties and running the scanner, I got different errors. See attachment.
I get the message: Please contact SonarSource Support and provide file E:\Jenkins\Slave\workspace\cc_prs\sonar-cfamily.reproducer
scanner-output.txt (30.5 KB)
But the sonar-cfamily.reproducer is not there at all.
I see others also struggling to generate this reproducer file: Crash (IllegalStateException) during C++ analysis
if you are facing issues to create a reproducer, could you please try to create a minimalistic project which reproduce the issue and share it with us?
While I tried to create a minimalistic project, I discovered that if I change the directory name of the project, the scanner is not crashing.
For example, to original folder name is cc_prs. If I renamed it to test, or even to cc_prs_, the scanner is working and the analyses finishes.
Could this give you some hint, guys?
I am bit struggling to create the minimalistic project, as I have to guard our IP, yet create a project that crashes. On top of this, a simple directory rename makes the whole issue disappear…
if you did that keeping the property
sonar.cfamily.reproducer=e:/Jenkins/Slave/workspace/cc_prs/src/implement/diag_cfg.c it’s normal that there is no crash anymore, because the analyzer doesn’t do anything in such case because the filename doesn’t match, hence no crash. Is it the case?
Sorry for the late reply. I was not able to spend time on this in the past weeks…
I am not sure exactly what happened. The ‘reproducer’ line was not in the project properties file when I was testing this. But now I cannot reproduce this: the scanner crashing also in renamed directories.
This is on one hand good, as I was able to create a simple project which still fails.
How can I send you the test project? I can upload only images and text, not a zipped folder…
I’ve seen in the forums that you guys suggest to setup a project in Sonarcloud, instead of uploading a complete project.
I’ve created a Sonarcloud project, and the scanner crashes whenever I execute it.
Here is the project: https://sonarcloud.io/dashboard?id=cc_prs_
The build command I use:
build-wrapper-win-x86-64.exe --out-dir bw-output make -kr all _TARGET=gcc _CONFIG=release
The scanner command:
sonar-scanner.bat -D"sonar.projectKey=cc_prs_" -D"sonar.organization=tcsabina-github" -D"sonar.sources=." -D"sonar.cfamily.build-wrapper-output=bw-output" -D"sonar.host.url=https://sonarcloud.io" -D"sonar.login=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
The auth.token might be expired when you read this (or not?), but I think you know how to deal with it.
The gcc version I am using is 4.9.3. I guess the build wrapper is calling gcc, right?
Archive it and rename it to `.txt and you’ll be able to upload it.
Unfortunately I need the source code, if it is in a public repo just share the link to it.
Tokens do not expire automatically, please delete it as you shared it publicly.
Here is the project:
cc_prs_.zip.txt (88.6 KB)
I hope this is enough…
thank you for your reproducer, I managed to reproduce the issue, it is due to mingw
gcc, I created a ticket on dev side: CPP-2126.
Good to hear!
What is normally the lead time for such bug?
we will fix it in next release for sure, unfortunately I still don’t know when.
In the mean time you could try to use a different compiler than mingw32 gcc, that should work. Is it the only compiler you can use for your project?
Different (newer) compiler is under investigation, but takes some time to switch.
the issue has been fixed and the analyzer will be released in the upcoming days.
version 6.2 of the C/C++ analyser has been released and made public in the marketplace as of today.