-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulated x86 and x64 .NET 7 on ARM64 can't create new project #71856
Comments
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. |
I have a similar issue with running x64 dotnet 7 on arm64 Windows 11 – simple Windows 11 runs as a Parallels VM on a macOS 12.4 Monterey with Apple's M1 chip.
showHost Name: BUILD1287 OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22621 N/A Build 22621 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Owner: build Registered Organization: Product ID: 00330-80000-00000-AA303 Original Install Date: 7/8/2022, 5:35:11 PM System Boot Time: 7/12/2022, 9:36:05 PM System Manufacturer: Parallels International GmbH. System Model: Parallels ARM Virtual Machine System Type: ARM64-based PC Processor(s): 4 Processor(s) Installed. [01]: ARMv8 (64-bit) Family 8 Model 0 Revision 0 ~3200 Mhz [02]: ARMv8 (64-bit) Family 8 Model 0 Revision 0 ~3200 Mhz [03]: ARMv8 (64-bit) Family 8 Model 0 Revision 0 ~3200 Mhz [04]: ARMv8 (64-bit) Family 8 Model 0 Revision 0 ~3200 Mhz BIOS Version: Parallels International GmbH. 17.1.4 (51567), 1/1/1601 Windows Directory: C:\Windows System Directory: C:\Windows\system32 Boot Device: \Device\HarddiskVolume2 System Locale: en-us;English (United States) Input Locale: en-us;English (United States) Time Zone: (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna Total Physical Memory: 6,139 MB Available Physical Memory: 3,692 MB Virtual Memory: Max Size: 7,803 MB Virtual Memory: Available: 5,563 MB Virtual Memory: In Use: 2,240 MB Page File Location(s): C:\pagefile.sys Domain: WORKGROUP Logon Server: \\BUILD1287 Hotfix(s): 2 Hotfix(s) Installed. [01]: KB5014688 [02]: KB5015275 Network Card(s): 1 NIC(s) Installed. [01]: Parallels VirtIO Ethernet Adapter Connection Name: Ethernet DHCP Enabled: Yes DHCP Server: ... IP address(es) ... Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
showComponent Information REG_BINARY 00000000000000000000000000000000 Identifier REG_SZ ARMv8 (64-bit) Family 8 Model 0 Revision 0 Configuration Data REG_FULL_RESOURCE_DESCRIPTOR FFFFFFFFFFFFFFFF0000000000000000 VendorIdentifier REG_SZ ~MHz REG_DWORD 0xc80 CP 4020 REG_QWORD 0x1101000010111111 CP 4021 REG_QWORD 0x20 CP 4028 REG_QWORD 0x10305006 CP 4029 REG_QWORD 0x0 CP 402C REG_QWORD 0x0 CP 402D REG_QWORD 0x0 CP 4030 REG_QWORD 0x221100110212120 CP 4031 REG_QWORD 0x11110211202 CP 4038 REG_QWORD 0x10000f100001 CP 4039 REG_QWORD 0x11212000 CP 403A REG_QWORD 0x1001001100001011 CP 4000 REG_QWORD 0x410f0000 CP 5801 REG_QWORD 0x8444c004 CP 4080 REG_QWORD 0x100030d059dd CP 4081 REG_QWORD 0x0 CP 4100 REG_QWORD 0x800001b75c0000 CP 4510 REG_QWORD 0x444400ff444400ff ProcessorNameString REG_SZ Apple Silicon |
@marswe Thank you for reporting this. You can set this environment variable as a workaround: @janvorli @mangod9 Emulation of x86/x64 on ARM64 is completely broken by W^X. It fails due to access violation at random locations. Should we disable it for the emulated execution mode? |
Let me investigate what's wrong first. I have no idea why it would fail. |
I have found the problem for x86 emulated code - it was an incorrect cache flushing for GC write barriers. We were flushing them at the original location instead of their copy in allocated memory. But the x64 flushing at that point looks correct, so I'll need to debug that too. |
Today we tested the latest .NET 7 RC1 SDK from main branch of https://github.com/dotnet/installer, detailed results are as below. x64 version: x86 version: |
@v-xiaofchen yes, it will repro until my fix will make it into a SDK. |
I can see that my change came in couple of commits after the commit from which the 7.0.100-rc.1.22403.8 was created. So I assume the next one that will come out will have it. |
fix should be in runtime 7.0.0-rc.1.22403.8 and sdk 7.0.100-rc.1.22404.5 (daily build installers published few hours ago) |
Hi @janvorli @kasperk81, today we validated on SDK 7.0.100-rc.1.22408.3(runtime-7.0.0-rc.1.22403.8). |
That is an unrelated installer(?) issue. If you download the zip, it works fine. |
@AntonLapounov Thanks, we'll track it down with this new bug. |
Description
The ARM64 version of .NET 7 preview 5 seems to work well, but even following the Hello World instructions does not work for the x86 and x64 versions when running on ARM64.
The x86 version hits an error and bails out when trying to create a new console app:
The x64 version instead hangs on running dotnet restore (with a CPU core spinning endlessly):
Reproduction Steps
Expected behavior
Expected behavior is documented at https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/create
Actual behavior
The x86 version:
The x64 version:
Followed by endless spinning of dotnet.exe using one core:
This is on a 3-core VM. On 8-core device it uses 12-15% CPU.
Regression?
This works with the released version of .NET 6.
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: