Closed hach-que closed 1 month ago
I have also been able to confirm that this bug is still present in .NET 8 Preview 5.
Do you have any lead @janvorli ? It seems like https://github.com/dotnet/runtime/issues/102313 is similar/same. I can possibly run binary search on commits if I get local repro. let me know.
It seems like https://github.com/dotnet/runtime/issues/102313 was fixed in preview 5. Can you please give it shot @hach-que ?
This issue has been marked needs-author-action
and may be missing some important information.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
This issue will now be closed since it had been marked no-recent-activity
but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
Description
Redirecting standard output and standard error of child processes for a ReadyToRun executable on macOS M1 can result in:
Some important notes about this bug:
PublishReadyToRun
. If ReadyToRun is turned off, this crash won't happen.PublishTrimmed
has no effect on whether the bug reproduces. I can reproduce it with both trimming on and off, as long asPublishReadyToRun
is turned on.osx.11.0-arm64
andosx.12-arm64
, so it does not appear to be RID-dependent. I do not have an x64 Mac so I can't say whether it reproduces on the Intel architecture.while true
loop to reproduce it./usr/bin/git init <path>
,/usr/bin/git --version
, and/bin/bash -c true
I managed to reproduce this issue on the following system:
dotnet-sdk
I could also reproduce it on a second system with identical OS version and hardware configuration (building the binary again, rather than copying the built binary), so it is not specific to a single machine or environment.
Reproduction Steps
Create
Program.cs
with this content:Create the
procrepo.csproj
project with this content:Build the project with:
Run the process in a loop with to reproduce the crash:
Reproduction rate
When I ran the program with this Bash command:
the results were that this crash happens 5% of the time.
Expected behavior
The .NET process should not crash with AccessViolationException.
Actual behavior
A crash with a callstack that looks similar to one of the following. It's not consistent, and I have seen callstacks that differ from the ones below, but these are the most common:
Regression?
No response
Known Workarounds
Turn off
PublishReadyToRun
in the project file when targeting macOS.Configuration
No response
Other information
No response