Subprocess.exe crashing

Please provide

  • Operating system:
    |Edition|Windows 10 Enterprise|
    |—|—|
    |Version|20H2|
    |Installed on|‎22/‎04/‎2022|
    |OS build|19042.685|
    |Experience|Windows Feature Experience Pack 120.2212.551.0|

  • SonarLint plugin version:
    6.0.52071
    subprocesse.exe --version:
    LLVM (http://llvm.org/):
    LLVM version 14.0.0
    Optimized build.
    Default target: x86_64-pc-windows-msvc
    Host CPU: skylake

  • Is connected mode used:

    • Connected mode.
    • Connected to SonarQube:
    • Enterprise Edition
    • Version 9.4 (build 54424)

And a thorough description of the problem / question:

subprocess.exe crashes semi-regularly. There are no debug symbols in the plugin, but here is the raw stack trace.

subprocess.exe!00007ff6f8c16ddc()
subprocess.exe!00007ff6f8990eca()
subprocess.exe!00007ff6f89927ee()
subprocess.exe!00007ff6f8993223()
subprocess.exe!00007ff6f898fe59()
subprocess.exe!00007ff6f8966c32()
subprocess.exe!00007ff6f8990b07()
subprocess.exe!00007ff6f89927ba()
subprocess.exe!00007ff6f8993223()
subprocess.exe!00007ff6f89707c6()
subprocess.exe!00007ff6f8a5478a()
subprocess.exe!00007ff6f8a53ef7()
subprocess.exe!00007ff6f8a5674a()
subprocess.exe!00007ff6f85302c9()
subprocess.exe!00007ff6f852e712()
subprocess.exe!00007ff6f84771e6()
subprocess.exe!00007ff6f846d052()
subprocess.exe!00007ff6f796002f()
subprocess.exe!00007ff6f9bc3654()
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Hi,

Welcome to the community!

The current version of SonarLint for Visual Studio 2022 is 6.7.0.52071. Could you upgrade and see if the problem persists?

 
Ann

Hi Ann,

That is the version I reported the problem against. The problem has persistent for ~4 days and I have now had to temporarily disable the plugin to make progress.

With thanks,
Marc

@Marc_Butler could you try the recently-released v6.8 of SonarLint for Visual Studio please?

It contains an updated version of the CFamily analyzer with fixes for a couple of types of crash.

If the problem persists, please create and send us a reproducer files as described here. That will allow the CFamily team to investigate the problem.

Thank you.

Hi Duncan,

After the upgrade I am not having the repeated crash I was seeing before. Apologies, but I was unable to correlate the crash to a scenario or code construct, and hence could not provide a small sanitized example from the large code base on which I am working.

I did clone the plugin and attempt to build it with the intention of hopefully running it with debug symbols, but lacked both the expertise and time to overcome the problems I encountered trying to build it.

With thanks,
Marc

1 Like

Thanks for the update @Marc_Butler - good to hear that the repeated crash is no longer occurring.

So I am experience the crashing again. Here is the output for the first crash I have experienced today.

Note the crash always seems to be the same Index out of range error, and is often preceded by:

ERROR: LLVM ERROR: Invalid abbrev number

Sonarlint output:

Failed to analyze **PATH REMOVED**: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
   at SonarLint.VisualStudio.CFamily.SubProcess.Protocol.ReadUTF(BinaryReader reader)
   at SonarLint.VisualStudio.CFamily.SubProcess.Protocol.Read(BinaryReader reader, Action`1 handleIssue)
   at SonarLint.VisualStudio.CFamily.Analysis.CLangAnalyzer.<>c__DisplayClass16_0.<ExecuteSubProcess>b__1(StreamReader reader)
   at SonarLint.VisualStudio.CFamily.SubProcess.ProcessRunner.Execute(ProcessRunnerArguments runnerArgs)
   at SonarLint.VisualStudio.CFamily.Analysis.CLangAnalyzer.ExecuteSubProcess(Action`1 handleMessage, IRequest request, IProcessRunner runner, ILogger logger, CancellationToken cancellationToken, IFileSystem fileSystem)
   at SonarLint.VisualStudio.CFamily.Analysis.CLangAnalyzer.CallSubProcess(Action`1 handleMessage, IRequest request, ISonarLintSettings settings, ILogger logger, CancellationToken cancellationToken)
   at SonarLint.VisualStudio.CFamily.Analysis.CLangAnalyzer.RunAnalysis(IRequest request, IIssueConsumer consumer, IAnalysisStatusNotifier statusNotifier, CancellationToken cancellationToken)