Repository navigation
DotnetFuzzing doesn't compile on linux succesfully #113285
Copy link
Copy link
Open
Milestone
Description
Description
After building dotnet with ./build.sh -subset clr+libs -configuration Release -runtimeConfiguration Debug and then trying to run dotnet build with the compiled binary in the fuzzers directory, I am hit with the following error:
~/runtime/src/libraries/Fuzzing/DotnetFuzzing$ dotnet build
Determining projects to restore...
Restored /home/oof/runtime/src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj (in 390 ms).
Restored /home/oof/runtime/src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj (in 377 ms).
Restored /home/oof/runtime/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj (in 379 ms).
Restored /home/oof/runtime/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj (in 390 ms).
Restored /home/oof/runtime/src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj (in 389 ms).
Restored /home/oof/runtime/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj (in 377 ms).
Restored /home/oof/runtime/src/tools/illink/src/linker/Mono.Linker.csproj (in 377 ms).
Restored /home/oof/runtime/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.csproj (in 377 ms).
Restored /home/oof/runtime/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj (in 379 ms).
Restored /home/oof/runtime/src/tools/illink/src/linker/ref/Mono.Linker.csproj (in 377 ms).
Restored /home/oof/runtime/src/libraries/System.Collections/ref/System.Collections.csproj (in 377 ms).
Restored /home/oof/runtime/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj (in 379 ms).
Restored /home/oof/runtime/src/libraries/System.Runtime/ref/System.Runtime.csproj (in 3 ms).
Restored /home/oof/runtime/src/tools/illink/src/ILLink.CodeFix/ILLink.CodeFixProvider.csproj (in 8 ms).
Restored /home/oof/runtime/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj (in 10 ms).
Restored /home/oof/runtime/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj (in 24 ms).
Restored /home/oof/runtime/src/libraries/Fuzzing/DotnetFuzzing/DotnetFuzzing.csproj (in 25 ms).
Restored /home/oof/runtime/src/libraries/System.Runtime.InteropServices/gen/DownlevelLibraryImportGenerator/DownlevelLibraryImportGenerator.csproj (in 8 ms).
/home/oof/runtime/.dotnet/sdk/10.0.100-preview.3.25125.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(515,5): error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'win-x64'. [/home/oof/runtime/src/libraries/Fuzzing/DotnetFuzzing/DotnetFuzzing.csproj]
Build FAILED.
/home/oof/runtime/.dotnet/sdk/10.0.100-preview.3.25125.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(515,5): error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'win-x64'. [/home/oof/runtime/src/libraries/Fuzzing/DotnetFuzzing/DotnetFuzzing.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:03.22
The runtime isn't finding the sdk for some reason.
Reproduction Steps
Repro explained in previous step
Expected behavior
Should compile fuzzers succesfully
Actual behavior
Doesn't compile succesfully. Exits with error.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsNo status
Activity
MihaZupan commentedon Mar 8, 2025
The setup is currently specific to Windows.
See note in https://github.com/dotnet/runtime/tree/main/src/libraries/Fuzzing readme
Note
The instructions assume you are running on Windows as that is what the continuous fuzzing runs currently use.
dotnet-policy-service commentedon Mar 8, 2025
Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.
danmoseley commentedon Mar 8, 2025
Is it something fixable @MihaZupan
MihaZupan commentedon Mar 8, 2025
Sure, it should be possible, it's "just work".
Having the option to run with AFL or similar could also be interesting (we're using libFuzzer currently).
Other than dev inner loop for Linux, I don't think there's a pressing need for it given that the things we're currently testing shouldn't differ much by OS.
personnumber3377 commentedon Mar 9, 2025
I mean the readme just says that it assumes that you are running windows, not that the fuzzer is windows only. I think it is poorly worded. I am new to dotnet development and I don't really know how to make it work with linux. And I agree that this isn't really needed, but this would be convenient because you don't need to work with visual studio etc. on linux platforms.
dotnet-policy-service commentedon Jul 21, 2025
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.
am11 commentedon Jan 28, 2026
One issue is that it is missing
-c Releasefrom DotnetFuzzing'sdotnet buildcommand. The host package, in this case, was built for Release based on the first command (it publishes as self-contained app which is why host package matters). I was having this exact issue on win-x64 yesterday and found this oopsie.MihaZupan commentedon Jan 28, 2026
Might also be an issue with the fact we're currently hardcoding the path for the Debug apphost.
Ideally we should check to see which one actually exists here and allow using a Release one.
runtime/src/libraries/Fuzzing/DotnetFuzzing/DotnetFuzzing.csproj
Line 9 in e69a9ea