Skip to content
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

dotnet-dump analyze does not work on M3 macOS #4779

Open
wfurt opened this issue Jul 9, 2024 · 7 comments
Open

dotnet-dump analyze does not work on M3 macOS #4779

wfurt opened this issue Jul 9, 2024 · 7 comments
Assignees
Labels
bug Something isn't working Needs: Attention 👋
Milestone

Comments

@wfurt
Copy link
Member

wfurt commented Jul 9, 2024

Description

I collected dump from runtime test run on my MacBook and I failed to analyze it on the same machine

Configuration

I have MacBook with M3 CPU

image

Regression

It did work on my old Intel Mac.

Other information

lenoch:tmp furt$ dotnet-dump  collect -p 56833

Writing full to /private/tmp/core_20240709_103409
Complete
lenoch:tmp furt$ dotnet-dump analyze /private/tmp/core_20240709_103409
Loading core dump: /private/tmp/core_20240709_103409 ...
Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command.
Type 'quit' or 'exit' to exit the session.
> clrstack
SOS does not support the current target architecture 'arm64' (0xaa64). A 32 bit target may require a 32 bit debugger or vice versa. In general, try to use the same bitness for the debugger and target process.
> quit
@wfurt wfurt added the bug Something isn't working label Jul 9, 2024
@mikem8361
Copy link
Member

Can you enable logging with logging enable? Do commands like runtimes, sosstatus or dumpheap -stat work? It is almost like x64 version of libsos.dylib is being loaded (the one under osx-x64 instead of osx-arm64). The only way I could see that happening is if the SDK/runtime installed is x64 instead of arm64. Can you make sure the right runtime architecture is installed? dotnet --info should display that. You might have to reinstall the SDK and then dotnet-dump.

@wfurt
Copy link
Member Author

wfurt commented Jul 12, 2024

You were right. I did have x64 sdk installed for whatever reason. I deleted everything and it is better.

> clrstack
OS Thread Id: 0x27437 (0)
        Child SP               IP Call Site
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
GetFrameContext failed: 80070057
lenoch:tmp furt$ dotnet --info
.NET SDK:
 Version:           8.0.303
 Commit:            29ab8e3268
 Workload version:  8.0.300-manifests.c915c39d
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  14.5
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.303/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.7
  Architecture: arm64
  Commit:       2aade6beb0

.NET SDKs installed:
  8.0.303 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

@wfurt
Copy link
Member Author

wfurt commented Jul 12, 2024

Any thoughts on the GetFrameContext failed: 80070057 @mikem8361 ? It would be really nice to get stack and dump objects.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 12, 2024

That's probably dotnet/runtime#104816 - a relatively recent regression under investigation that was caused by dotnet/runtime@9528c15 this is .NET 8, so my point is moot.

@mikem8361
Copy link
Member

Sorry, I didn't actually look at the clrstack output. I saw that you said everything was ok and stopped reading.

@mikem8361 mikem8361 reopened this Jul 12, 2024
@mikem8361
Copy link
Member

I think we need a M3 to repro this.

@mikem8361
Copy link
Member

@wfurt would you mind trying the latest dotnet-dump version to see if this still repros?

You can install the latest preview like this:

dotnet tool update -g dotnet-dump --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Attention 👋
Projects
None yet
Development

No branches or pull requests

4 participants