[error] java.lang.IllegalStateException: java.io.IOException: The syntax for the file name, directory name or the volume label is incorrect during sonar scanner execution

  • SonarScanner 4.21 for MSBuild 5.2.1

Hello All,

We get an error during sonar scanner execution on the build server. It fails few times in a month on different build machines. However the file where it stops is the same and belongs to an old MFC project.
When a sonar cache is cleared, next execution is going well.

Log:

[error] java.lang.IllegalStateException: java.io.IOException: The syntax for the file name, directory name or the volume label is incorrect

##[error]at com.sonar.cpp.plugin.CFamilySensor.computeCanonicalPath(CFamilySensor.java:1041)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:908)
at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:901)
at com.sonar.cpp.plugin.CFamilySensor.save(CFamilySensor.java:856)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:707)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:611)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:366)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)
at com.sonar.cpp.plugin.CFamilySensor.computeCanonicalPath(CFamilySensor.java:1041)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:908)
at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:901)
at com.sonar.cpp.plugin.CFamilySensor.save(CFamilySensor.java:856)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:707)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:611)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:366)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)

Can you advise somehow?
Thanks!

Hi @mutleyy ,

would you be able to share the path of the file and the full log output? Is this file in a network drive?

Hi @mpaladin ,

The last info is about:
Cache hit for: D:\agent_02_work\66\s\MedFolio\Win32\MFMedication\MediSearch\MediSearchAX\MediSearchAXCtl.cpp

and then

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 32:45.900s

INFO: Final Memory: 23M/94M

INFO: ------------------------------------------------------------------------

##[error]ERROR: Error during SonarScanner execution

No, this is local file on a build machine.

Hi @mutleyy ,

sharing partial logs doesn’t help, you should share full logs to help us in the investigation. I can send you a PM if you want to share privately.

Hi @mpaladin ,
I would be grateful. So I am waiting.

Hi,

We have the same issue with Sonarqube 8.9.2 (running on windows 10). The analysis run from Azure DevOps pipeline.
Please find attached log.
sonar-error-path.txt (20.5 KB)

Hi @mutleyy ,

I sent you a PM.

Hi @matthieug ,

I sent you a PM too.