Closed erdembayar closed 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @dotnet/ncl, @vcsjones See info in area-owners.md if you want to be subscribed.
Author: | erdembayar |
---|---|
Assignees: | - |
Labels: | `area-System.Net.Security`, `untriaged` |
Milestone: | - |
Triage: We should investigate in 8.0 timeframe.
I'll try to reproduce it but I don't se anything in macOS PAL that would be suspicious. We starts using pool for the async state and that may be something fishy there. Any through on this @stephentoub ?
We starts using pool for the async state and that may be something fishy there. Any through on this @stephentoub ?
I'd be very surprised if something in the pooling implementation somehow caused an AV.
Related: https://github.com/dotnet/runtime/issues/13648 and https://gitlab.com/qemu-project/qemu/-/issues/249.
Also, I think the crash is happening in a Linux guest OS (in Docker) so the macOS PAL might not be directly relevant.
yes, the QEMU is tricky IMHO. I was using it for ARM (Linux on Linux) while back and it was never stable for me. Now, if I understand correctly the repro would run Linux x64 runtime binaries on M1 macOS, right? That is long shot.
ARM has different memory model and while our binaries should account for that, the x64 binaries do not e.g. they assume particular behavior and it is up to the emulation to deal with that. For macOS binaries this is handled by macOS kernel AFAIK ... and we used to produce x64 for a while even for the M1/2.
Now, 7.0 SslStream did change and we use pooling now for async state. But it is certainly possible that this simply exposed QEMU bug. It would be interesting if there is any repro without QEMU...
there is no strong indication this is .NET bug. With QEMU involved I'm going to close it unless proven otherwise.
Description
This problem is regression with sdk7.0 from sdk6.0, everything works as expected on sdk 6.0. I see
memory violation/corruption error
in stack trace and it looks like an issue in the runtime: seeSystem.Net.Security.AsyncReadWriteAdapter
in stacktrace, can see previous similar issues https://github.com/dotnet/runtime/issues/70656, https://github.com/dotnet/runtime/issues/58349.NuGet side issue #12329, see comment. Considering this issue repro with
dotnew new list
command, I believe this is not NuGet issue, because it doesn’t involve any NuGet operation.Reproduction Steps
Need M1 MAC machine.
dotnet list new
ordotnet new console
command.Expected behavior
Here is successful docker build log with sdk6 on same M1 MAC machine, it's before regression experience.
Actual behavior
dotnet new list
:Dockerfile
dotnet new list
, I got this from inside container. Below messages suggest it'ssdk image
problem, probably Docker is not pulling in correct platform image. I did trylinux/arm64/v8
platform withdocker-composer
but it found, not sure if it by design or not. There are many issues regardingqemu: uncaught target signal 11 (Segmentation fault)
, they suggest it's eitherqemu
ordocker image
problem: https://stackoverflow.com/a/68916382, https://github.com/docker/for-mac/issues/5123dotnet new console
,Stack trace details
```cli Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Newtonsoft.Json.JsonWriter.AutoComplete(Newtonsoft.Json.JsonToken) at Newtonsoft.Json.JsonTextWriter.WriteValue(Int64) at Newtonsoft.Json.Linq.JValue.WriteTo(Newtonsoft.Json.JsonWriter, Newtonsoft.Json.JsonConverter[]) at Newtonsoft.Json.Linq.JToken.ToString(Newtonsoft.Json.Formatting, Newtonsoft.Json.JsonConverter[]) at Microsoft.TemplateEngine.JExtensions.ToJTokenStringDictionary(Newtonsoft.Json.Linq.JToken, System.StringComparer, System.String) at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.ConfigModel.GeneratedSymbol..ctor(System.String, Newtonsoft.Json.Linq.JObject) at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.ConfigModel.SymbolModelConverter.GetModelForObject(System.String, Newtonsoft.Json.Linq.JObject, Microsoft.Extensions.Logging.ILogger, System.String) at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.ConfigModel.TemplateConfigModel..ctor(Newtonsoft.Json.Linq.JObject, Microsoft.Extensions.Logging.ILogger, Microsoft.TemplateEngine.Orchestrator.RunnableProjects.ISimpleConfigModifiers, System.String) at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectConfig..ctor(Microsoft.TemplateEngine.Abstractions.IEngineEnvironmentSettings, Microsoft.TemplateEngine.Abstractions.IGenerator, Microsoft.TemplateEngine.Abstractions.Mount.IFile, Microsoft.TemplateEngine.Abstractions.Mount.IFile, Microsoft.TemplateEngine.Abstractions.Mount.IFile, System.String) at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectGenerator.Microsoft.TemplateEngine.Abstractions.IGenerator.GetTemplatesAndLangpacksFromDir(Microsoft.TemplateEngine.Abstractions.Mount.IMountPoint, System.Collections.Generic.IList`1