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

Regarding Memory Leak Check in Android Platform with dotnet-gcdump #101847

Open
deepika134 opened this issue May 3, 2024 · 4 comments
Open

Regarding Memory Leak Check in Android Platform with dotnet-gcdump #101847

deepika134 opened this issue May 3, 2024 · 4 comments
Labels
area-Tracing-mono needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity os-android question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@deepika134
Copy link

Description

I am using dotnet-gcdump to check for memory leaks in a MAUI application on the Android platform. For more information on dotnet-gcdump, please refer to the following link:
https://github.com/dotnet/maui/wiki/Memory-Leaks.
I have successfully used gcdump on the Windows platform. However, when attempting to check for memory leaks on the Android platform, I did not receive the details of the process ID. I am using an Android emulator to conduct the memory leak check. The gcdump documentation states that this support is available in .NET 8, which is the version I am using, but gcdump is failing to write. I kindly request any suggestions to resolve this issue.

Steps to Reproduce

  1. Create a simple application in .NET MAUI.
  2. Run the project on the Android platform.
  3. Run the dotnet-gcdump ps command to collect the process ID. In that Android emulator process ID did not show, which caused us to be unable to collect the memory leaks.

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@PureWeen
Copy link
Member

PureWeen commented May 3, 2024

/similarissues

@mattleibow mattleibow transferred this issue from dotnet/maui May 3, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 3, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 3, 2024
@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 7, 2024
@mdh1418
Copy link
Member

mdh1418 commented May 13, 2024

Hi @deepika134, for mobile device scenarios, dotnet-dsrouter is required to bridge the connection between the diagnostic tooling (dotnet-gcdump in this case) running on the host machine and the application running on the target device (android emulator in this case).

Xamarin-Android has documentation for running the diagnostic tooling scenarios on Android https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/tracing.md

For even more information, there is a detailed explanation for the mono runtime component that enables a TCP/IP between the mono runtime and diagnostic tooling https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md

@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label May 13, 2024
@tommcdon tommcdon added this to the 9.0.0 milestone May 13, 2024
@tommcdon tommcdon added question Answer questions and provide assistance, not an issue with source code or documentation. needs-author-action An issue or pull request that requires more info or actions from the author. labels May 13, 2024
Copy link
Contributor

This issue has been marked needs-author-action and may be missing some important information.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tracing-mono needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity os-android question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

6 participants