github / github/codeql

Azure DevOps Ubuntu 24.04 DB Creation for C#

Đang mở
#21,562 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

Using an Azure DevOps Ubuntu 24.04 image as ubuntu-latest

Downloaded CodeQL command-line toolchain release 2.25.0.

Creating CodeQL DB for 'csharp' in '/home/vsts/work/1/a/codeqldb/csharp' with args: --build-mode none

Receiving the following error message in the pipeline:

========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/c3d589b8-77a0-43fe-b1a2-aefbb9428de0.sh
→ Creating CodeQL DB for 'csharp' in '/home/vsts/work/1/a/codeqldb/csharp' with args: --build-mode none
Initializing database at /home/vsts/work/1/a/codeqldb/csharp.
Running build command: []
Running command in /home/vsts/work/1/s/network: [/home/vsts/work/1/s/codeql/csharp/tools/autobuild.sh]
[2026-03-23 09:09:16] [build-stdout] CodeQL C# autobuilder
[2026-03-23 09:09:16] [build-stdout] Working directory: /home/vsts/work/1/s/network
[2026-03-23 09:09:16] [build-stdout] [001] Extracting C# with build-mode set to 'none'
[2026-03-23 09:09:16] [build-stdout] [001] Finding files in /home/vsts/work/1/s/network...
[2026-03-23 09:09:16] [build-stdout] [001] Found 766 files in /home/vsts/work/1/s/network
[2026-03-23 09:09:16] [build-stdout] [001] Found 766 small non-binary files in /home/vsts/work/1/s/network.
[2026-03-23 09:09:16] [build-stdout] [001] Found 426 source files in /home/vsts/work/1/s/network.
[2026-03-23 09:09:16] [build-stdout] [001] Found 0 global.json files in /home/vsts/work/1/s/network.
[2026-03-23 09:09:16] [build-stdout] [001] No Dependabot proxy credentials are configured.
[2026-03-23 09:09:16] [build-stdout] [001] Using .NET CLI executable: 'dotnet'
[2026-03-23 09:09:16] [build-stdout] [001] Running 'dotnet --info'
[2026-03-23 09:09:19] [build-stderr] [001] Error: Missing dotnet CLI
[2026-03-23 09:09:19] [build-stderr] Unhandled exception. System.Exception: dotnet --info failed with exit code 139.
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.DependencyFetching.DotNet.Info()
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.DependencyFetching.DotNet..ctor(IDotNetCliInvoker dotnetCliInvoker, ILogger logger, Boolean runDotnetInfo, TemporaryDirectory tempWorkingDirectory)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.DependencyFetching.DotNet..ctor(ILogger logger, String dotNetPath, TemporaryDirectory tempWorkingDirectory, DependabotProxy dependabotProxy)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.DependencyFetching.DotNet.Make(ILogger logger, String dotNetPath, TemporaryDirectory tempWorkingDirectory, DependabotProxy dependabotProxy)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.DependencyFetching.DependencyManager..ctor(String srcDir, ILogger logger)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.Standalone.Extractor.Run(Options options)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Extraction.CSharp.Standalone.Program.Main(String[] args)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Autobuild.CSharp.StandaloneBuildRule.<>c.b__0_1(IBuildActions _)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Util.BuildScript.ReturnBuildCommand.Run(IBuildActions actions, Action`2 startCallback, Action`3 exitCallBack, BuildOutputHandler onOutput, BuildOutputHandler onError)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Util.BuildScript.BindBuildScript.Run(IBuildActions actions, Action`2 startCallback, Action`3 exitCallBack, BuildOutputHandler onOutput, BuildOutputHandler onError)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Util.BuildScript.BindBuildScript.Run(IBuildActions actions, Action`2 startCallback, Action`3 exitCallBack, BuildOutputHandler onOutput, BuildOutputHandler onError)
[2026-03-23 09:09:19] [build-stderr] at Semmle.Autobuild.Shared.Autobuilder`1.AttemptBuild()
[2026-03-23 09:09:19] [build-stderr] at Semmle.Autobuild.CSharp.Program.Main()
[2026-03-23 09:09:21] [build-stderr] Aborted (core dumped)
[2026-03-23 09:09:21] [ERROR] Spawned process exited abnormally (code 134; tried to run: [/home/vsts/work/1/s/codeql/csharp/tools/autobuild.sh])
A fatal error occurred: Exit status 134 from command: [/home/vsts/work/1/s/codeql/csharp/tools/autobuild.sh]

##[error]Bash exited with code '2'.
Finishing: codeql: database-build-csharp

We have already installed dotnet on the image, I can't work out why our pipelines are failing?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing the Azure DevOps pipeline on the Ubuntu 24.04 image and inspect the reported `dotnet --info` failure. Trace the C# extraction path through `codeql/csharp/tools/autobuild.sh`, comparing the installed .NET CLI with what the autobuilder sees. Done means the C# database is created successfully without the exit-134 failure.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, csharp, ubuntu
Lĩnh vực
ci-cd, devops, security
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.