What’s your version of SonarQube? Check the page footer if you’re not sure. And can you verify that the version of the build-wrapper you’re using is from that version of SonarQube?
I’ve been told a few minutes ago that it’s a good idea to differentiate between SonarQube and SonarCloud. So my fault might have been that I’m stating “SonarQube” when in reality I mean “SonarCloud”. Sorry …
Based on that … I’ve downloaded the build-wrapper from
I have some sonar-scanner installed inside my docker image as well. That is 5.0.1.3006 - dated from August 2023.
The build-wrapper executable is located at /opt/SonarQube/build-wrapper/build-wrapper-linux-x86-64.
The sonar-scanner executable is located at /opt/SonarQube/sonar-scanner-5.0.1.3006/bin.
Is build-wrapper already trying to use parts of the sonar-scanner folder??? I thought that build-wrapper needs to complete successfully on its own and then one can call sonar-scanner ?
Inside the sonar-scanner folder there is no separate build-wrapper; so I’m not sure what you mean with “the version of the build-wrapper you’re using is from that version of SonarQube” ?
How do I check?
You should consider my misunderstanding wrt. terms “SonarQube” and “SonarCloud” …
In the specified --out-dir for the build-wrapper command (/home/builduser/builddir/target/build/reports/QBS-2.1.2-linux64-gcc-qt6-5-6-release/sonar_result_folder), it should be possible to find a few files (including build-wrapper.log). Would it be possible for you to share these files with us? I can start a thread with you if you prefer to share the files privately.
When sharing these files, it would be nice if you also have the full tree output from ps -af (especially including the PIDs of each of these processes), and the full terminal output from running the wrapped build command.
A couple of other questions that can help understand the problem:
Does the build process always hang while using build-wrapper? Or is this non-determenistic?
I did a quick test with a small qbs project on my side and I couldn’t reproduce. Do you get this problem on any qbs project, or is this project-specific?
Running the whole tree under strace can help gather some clues why qbs_processlauncher gets stuck. For example, by using strace --output trace.log -ff build-wrapper ....
As a workaround, you can try to generate the compilation database using qbs. For example, by using qbs generate --generator clangdb. See the docs here.
The build-wrapper.log is available together with build-wrapper-dump.json and compile_commands.json.
Of course I can provide a new process tree dump by triggering the build again.
Wrt. item 1 and “always hang”: the job containing this SonarCloud PoC is quite new … with out build number 7 we have been able to get everything up and running for the first time using build-wrapper. Now we are at build number 10. All of them have been hanging. But … “always” … hmmm … … strong word …
Wrt. item 2: this is our PoC project for qbs together with SonarCloud. So … “any qbs project” … hmmm … again a strong term … …
Wrt. item 3: yes, maybe I could replace qbs_processlauncher by some script containing the corr. strace call. Need to check what/where to change in our build infrastructure …
Wrt. item 4: inside the community here I’ve found a ticket
That one sounds like I run into other trouble with sonar-scanner when trying this. Or has this been fixed within sonar-scanner?
Of course I can also provide proc maps for the qbs_processlauncher process. And the corr. environ file.
And another idea is me writing a question to qbs mailing list asking whether others are using SonarCloud.
Unfortunately, The information collected privately didn’t help reproduce the problem described here.
However, based on our testing, the cause seems to be project-specific. Please let me know if you are willing to share the strace logs I requested in the end.