Open jonpryor opened 2 months ago
Note: you may need to run dotnet build Java.Inteorp.sln
more than once to get to the crash. I've also seen this error, which doesn't repro:
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: System.IO.IOException: The process cannot access the file '…/java-interop/bin/BuildDebug-net8.0/jnienv-gen.runtimeconfig.json' because it is being used by another process. […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at System.IO.File.Create(String path) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(RuntimeFramework[] runtimeFrameworks, LockFileTargetLibrary platformLibrary, Boolean isFrameworkDependent, IList`1 packageFolders) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
…/dotnet-sdk-8.0.401-osx-x64/sdk/8.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(379,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) […/java-interop/build-tools/jnienv-gen/jnienv-gen.csproj]
I'm not (currently) reporting this MSB4018 from GenerateRuntimeConfigurationFiles
.
@AaronRobinsonMSFT Did we make any servicing fixes that could have caused this?
This might have been introduced by https://github.com/dotnet/runtime/pull/104818 and fixed by https://github.com/dotnet/runtime/pull/107199 .
cc @janvorli
If the crash occurs only under Rosetta and not on a real x64 macOS and there is some hardware exception handling going on, this could be what @jkotas said.
Description
.NET 8.0.401 + macOS crashes, while .NET 8.0.303 doesn't.
Reproduction Steps
Alas, not minimal:
Expected behavior
Build completes without error.
Note: requires that dotnet/java-interop dependencies already exist, which includes a C++ toolchain, Java SDK, etc.…
Actual behavior
Fails to build:
Re-run with diagnostic logging enabled:
and there isn't much additional output regarding the crash.
Regression?
Yes. This same repo builds with .NET 8.0.303. See also: https://github.com/dotnet/java-interop/pull/1245
Known Workarounds
Use .NET 8.0.303.
Configuration
Other information
This doesn't appear to fail on Linux-x64.