Closed mockjv closed 2 years ago
Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov See info in area-owners.md if you want to be subscribed.
Author: | mockjv |
---|---|
Assignees: | - |
Labels: | `area-Single-File`, `untriaged` |
Milestone: | - |
@VSadov can you take a look? Would this be fixed by the recent change we took?
The symptoms look a lot like the issues that were just fixed.
I am not sure if we have any SDK builds published with the fixes yet. It generally takes a few days to got to SDK repo. Maybe next week. Then it would be possible to try the same scenario with pre-release SDK - to see if this is fixed.
One thing can be tried is to run the app with R2R disabled -
export COMPlus_ZapDisable=1
If it still crashes, then it could be something else.
@VSadov Sure enough that fixed my issue!
@VSadov Once have a moment to test the latest SDK, I'd be glad to close this but based on your description it's sounding like that'll be the case.
So, technically I get a different error message (bus error as opposed to a segmentation fault), but still experiencing a crash with 6.0.301. More of an FYI, as I assume that means that the changes didn't make their way into the recent release.
❯ cd /Users/E4226/Development/m1Test/bin/Debug/net6.0/osx-arm64/publish/
❯ dotnet publish -r osx-arm64 --self-contained /p:PublishSingleFile=true
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored /Users/E4226/Development/m1Test/m1Test.csproj (in 5.97 sec).
m1Test -> /Users/E4226/Development/m1Test/bin/Debug/net6.0/osx-arm64/m1Test.dll
m1Test -> /Users/E4226/Development/m1Test/bin/Debug/net6.0/osx-arm64/publish/
❯ cd /Users/E4226/Development/m1Test/bin/Debug/net6.0/osx-arm64/publish/
❯ ./m1Test
[1] 3725 bus error ./m1Test
❯ export COMPlus_ZapDisable=1
❯ ./m1Test
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /Users/E4226/Development/m1Test/bin/Debug/net6.0/osx-arm64/publish/
@mockjv Is this still occuring in 3.0.302/6.0.7?
@agocke Thanks for the reminder, looking good with 6.0.302/6.0.7 so closing...
Description
Attempting to produce a single file executable targeting
osx-arm64
that happens to be based on the Blazor Server template produces a bootstrap/host-executable that segfaults. I don't experience this is with published apps targetingosx-x64
. I also don't experience this issue with at least theconsole
template.Reproduction Steps
Using .NET 6.0.300 SDK
Expected behavior
Not crash! 😀
Actual behavior
The produced executable file segfaults:
Regression?
Haven't expressly tried this with any prior versions so unsure if this is a regression.
Known Workarounds
None
Configuration
.NET SDK 6.0.300
MacOS 12.4
M1 MacBook Pro
Other information
No response