Xilinx SDK 2018.3 0xc0000005 (Status Access Violation)

Hi,
we are using Sonarqube on a self-hosted MS Devops server to analyze the C code of a Xilinx SDK 2018.3 project.
Without Sonarqube, the pipelines have been working fine for several months.
When Sonarqube is enabled in the pipeline, the build-wrapper fails to execute the SDK build most of the time.
Here are two build-wrapper.log files, fail and success.

Fail:

Wed Nov 29 11:50:49 2023: build-wrapper, version 6.50 (win-x86-64)
Wed Nov 29 11:50:49 2023: isWow64: 0
Wed Nov 29 11:50:49 2023: windows version: 10.0, service pack: 0.0, build number: 19045, product type: 1
Wed Nov 29 11:50:49 2023: current directory: C:\agent\_work\1\s\Software
Wed Nov 29 11:50:49 2023: cwd: <C:\agent\_work\1\s\Software>
Wed Nov 29 11:50:49 2023: out-dir absolute path: <C:\agent\_work\1\s\Software\sonar-output>
Wed Nov 29 11:50:49 2023: command line received: <C:\Xilinx\SDK\2018.3\bin\xsdk.bat -batch -source sdk.tcl>
Wed Nov 29 11:50:49 2023: initializing json file
Wed Nov 29 11:50:49 2023: starting debug cycle
Wed Nov 29 11:50:49 2023: process created with pid: 15212
Wed Nov 29 11:50:49 2023: image path name: <C:\WINDOWS\system32\cmd.exe>
Wed Nov 29 11:50:49 2023: command line: <C:\WINDOWS\system32\cmd.exe /c C:\Xilinx\SDK\2018.3\bin\xsdk.bat -batch -source sdk.tcl>
Wed Nov 29 11:50:49 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 11:50:49 2023: isWow64: 0
Wed Nov 29 11:50:49 2023: skipping process C:\Windows\System32\cmd.exe with pid: 15212
Wed Nov 29 11:50:49 2023: process created with pid: 24760
Wed Nov 29 11:50:49 2023: image path name: <C:\Xilinx\SDK\2018.3\tps\win64\xvcredist.exe>
Wed Nov 29 11:50:49 2023: command line: <"C:/Xilinx/SDK/2018.3\tps\win64\xvcredist.exe"  -check>
Wed Nov 29 11:50:49 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 11:50:49 2023: isWow64: 0
Wed Nov 29 11:50:49 2023: skipping process C:\Xilinx\SDK\2018.3\tps\win64\xvcredist.exe with pid: 24760
Wed Nov 29 11:50:49 2023: process with pid 24760 exit with code: 0 (0x0)
Wed Nov 29 11:50:50 2023: process created with pid: 23936
Wed Nov 29 11:50:50 2023: image path name: <C:\Xilinx\SDK\2018.3\bin\unwrapped\win64.o\rdi_xsct.exe>
Wed Nov 29 11:50:50 2023: command line: <"C:/Xilinx/SDK/2018.3/bin/unwrapped/win64.o/rdi_xsct.exe"   sdk.tcl>
Wed Nov 29 11:50:50 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 11:50:50 2023: isWow64: 0
Wed Nov 29 11:50:50 2023: skipping process C:\Xilinx\SDK\2018.3\bin\unwrapped\win64.o\rdi_xsct.exe with pid: 23936
Wed Nov 29 11:50:51 2023: process with pid 23936 exit with code: 3221225477 (0xC0000005)
Wed Nov 29 11:50:51 2023: process with pid 15212 exit with code: 0 (0x0)
Wed Nov 29 11:50:51 2023: finalizing json file

Success:

Wed Nov 29 12:54:26 2023: build-wrapper, version 6.50 (win-x86-64)
Wed Nov 29 12:54:26 2023: isWow64: 0
Wed Nov 29 12:54:26 2023: windows version: 10.0, service pack: 0.0, build number: 19045, product type: 1
Wed Nov 29 12:54:26 2023: current directory: C:\agent\_work\1\s\Software
Wed Nov 29 12:54:26 2023: cwd: <C:\agent\_work\1\s\Software>
Wed Nov 29 12:54:26 2023: out-dir absolute path: <C:\agent\_work\1\s\Software\sonar-output>
Wed Nov 29 12:54:26 2023: command line received: <C:\Xilinx\SDK\2018.3\bin\xsdk.bat -batch -source sdk.tcl>
Wed Nov 29 12:54:26 2023: initializing json file
Wed Nov 29 12:54:26 2023: starting debug cycle
Wed Nov 29 12:54:26 2023: process created with pid: 25948
Wed Nov 29 12:54:26 2023: image path name: <C:\WINDOWS\system32\cmd.exe>
Wed Nov 29 12:54:26 2023: command line: <C:\WINDOWS\system32\cmd.exe /c C:\Xilinx\SDK\2018.3\bin\xsdk.bat -batch -source sdk.tcl>
Wed Nov 29 12:54:26 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 12:54:26 2023: isWow64: 0
Wed Nov 29 12:54:26 2023: skipping process C:\Windows\System32\cmd.exe with pid: 25948
Wed Nov 29 12:54:26 2023: process created with pid: 16336
Wed Nov 29 12:54:26 2023: image path name: <C:\Xilinx\SDK\2018.3\tps\win64\xvcredist.exe>
Wed Nov 29 12:54:26 2023: command line: <"C:/Xilinx/SDK/2018.3\tps\win64\xvcredist.exe"  -check>
Wed Nov 29 12:54:26 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 12:54:26 2023: isWow64: 0
Wed Nov 29 12:54:26 2023: skipping process C:\Xilinx\SDK\2018.3\tps\win64\xvcredist.exe with pid: 16336
Wed Nov 29 12:54:26 2023: process with pid 16336 exit with code: 0 (0x0)
Wed Nov 29 12:54:26 2023: process created with pid: 25816
Wed Nov 29 12:54:26 2023: image path name: <C:\Xilinx\SDK\2018.3\bin\unwrapped\win64.o\rdi_xsct.exe>
Wed Nov 29 12:54:26 2023: command line: <"C:/Xilinx/SDK/2018.3/bin/unwrapped/win64.o/rdi_xsct.exe"   sdk.tcl>
Wed Nov 29 12:54:26 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 12:54:26 2023: isWow64: 0
Wed Nov 29 12:54:26 2023: skipping process C:\Xilinx\SDK\2018.3\bin\unwrapped\win64.o\rdi_xsct.exe with pid: 25816
Wed Nov 29 12:54:27 2023: process created with pid: 24656
Wed Nov 29 12:54:27 2023: image path name: <C:\WINDOWS\system32\cmd.exe>
Wed Nov 29 12:54:27 2023: command line: <C:\WINDOWS\system32\cmd.exe /c C:\Xilinx\SDK\2018.3\bin\xsdk.bat -eclipseargs --launcher.suppressErrors -nosplash -application com.xilinx.sdk.cmdline.service 62835 -data C:/agent/_work/1/s/Software -vmargs -verbose -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole>
Wed Nov 29 12:54:27 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 12:54:27 2023: isWow64: 0
Wed Nov 29 12:54:27 2023: skipping process C:\Windows\System32\cmd.exe with pid: 24656
Wed Nov 29 12:54:27 2023: process created with pid: 4548
Wed Nov 29 12:54:27 2023: image path name: <C:\WINDOWS\system32\cmd.exe>
Wed Nov 29 12:54:27 2023: command line: <C:\WINDOWS\system32\cmd.exe  /S /D /c" echo "C:/Xilinx/SDK/2018.3" ">
Wed Nov 29 12:54:27 2023: working directory: <C:\agent\_work\1\s\Software\>
Wed Nov 29 12:54:27 2023: isWow64: 0
Wed Nov 29 12:54:27 2023: skipping process C:\Windows\System32\cmd.exe with pid: 4548
Wed Nov 29 12:54:27 2023: process created with pid: 11160
Wed Nov 29 12:54:27 2023: image path name: <C:\WINDOWS\system32\findstr.exe>
Wed Nov 29 12:54:27 2023: command line: <C:\WINDOWS\system32\findstr.exe  /C:";" >
Wed Nov 29 12:54:27 2023: working directory: <C:\agent\_work\1\s\Software\>
...
...
...

If the script fails, the application rdi_xsct.exe exits with code 0xC0000005, status access violation.
This never happens without Sonarqube.

Where to look for the root cause of the problem?

Thanks and BR!

Hey there.

What version of SonarQube are you using?

The Sonar server version is as follows: Enterprise Edition version 9.9 (build 65466)
But I don’t think the server version is a problem. The problem occurs when the build wrapper is running.

The build wrapper is downloaded in the pipeline script here: https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip
According to the log file, the wrapper is running version 6.50 (win-x86-64).

Hello @cornelius.wild, and welcome to the community!

Thank you for reporting the issue to us. I was able to reproduce the issue on my side, and I opened CPP-4885 to write down the steps. Below are a few of my notes about the problem:

  • The crash happens inside the rdi_xsct.exe process. Although the involvement of build-wrapper somehow influences that, my impression is that there is not much we can do on the build-wrapper side.
  • There is a report on Xilinx support about the executable sometimes crashing on Windows 10 in particular. Although, the issue is supposed to be fixed in 2017.3 or later, there is a comment saying “Seems that it’s back in Vivado 2018.3”.
  • We have another community thread where build-wrapper-windows was successfully used in conjunction with a very similar command in Xilinx SDK 2017.4.

The points above may indicate that this is a version-specific issue of Xilinx SDK. Therefore, I would suggest trying the following:

  • Try using a newer version of the Xilinx SDK if possible.
  • Try building (and analyzing) the project on a Linux machine using the Linux version of the SDK (and build-wrapper for Linux).
  • I don’t know much about Xilinx SDK, but I would also try looking for a way to generate a compilation database and use it instead of build-wrapper.
  • If this is a viable option for you, we also provide “Automatic Analysis for C++” on SonarCloud, which can help run the analysis without any information from the build.

Hope this helps!

Best regards,
Michael