dotnet / dotnet/maui

[Android][net10]Suspected memory leak

Open
#35,697 0 comments 1 reaction 0 assignees View on GitHub
area-core-lifecycle platform/android t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

### Description

dotnet10.0 Continuous increase in memory, net9 does not have this issue

### Steps to Reproduce

Download https://github.com/BaY1251/MauiDebug.git
1. Open /dotnet10-Leak/Leak-dotnet9.0.csproj and deploy the project
View memory changes within 1 hour through 'adb shell top'

2. Open /dotnet10-Leak/Leak-dotnet10.0.csproj and deploy the project
View memory changes within 1 hour through 'adb shell top'

3. 'Leak-dotnet10.0' Continuous increase in memory

### Link to public reproduction project repository

https://github.com/BaY1251/MauiDebug.git

### Version with bug

10.0.70

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

9.0.120 SR12

### Affected platforms

Android

### Affected platform versions

_No response_

### Did you find any workaround?

_No response_

### Relevant log output

```shell
04-29 04:52:46.721 643 4914 I ActivityManager: Process com.byo.leak (pid 2464) has died: fg TOP
04-29 04:52:46.721 643 695 I libprocessgroup: Successfully killed process cgroup uid 10084 pid 2464 in 0ms
04-29 04:52:46.722 544 1086 D BufferPoolAccessor2.0: bufferpool2 0xb4000074203a8ea8 : 0(0 size) total buffers - 0(0 size) used buffers - 24/27 (recycle/alloc) - 3/27 (fetch/transfer)
04-29 04:52:46.722 544 558 D BufferPoolAccessor2.0: bufferpool2 0xb4000074203a79d8 : 0(0 size) total buffers - 0(0 size) used buffers - 18/23 (recycle/alloc) - 5/23 (fetch/transfer)
04-29 04:52:46.722 544 1086 D BufferPoolAccessor2.0: Destruction - bufferpool2 0xb4000074203a8ea8 cached: 0/0M, 0/0% in use; allocs: 27, 89% recycled; transfers: 27, 89% unfetched
04-29 04:52:46.722 544 558 D BufferPoolAccessor2.0: bufferpool2 0xb4000074203abce8 : 0(0 size) total buffers - 0(0 size) used buffers - 19/22 (recycle/alloc) - 4/22 (fetch/transfer)
04-29 04:52:46.722 544 558 D BufferPoolAccessor2.0: Destruction - bufferpool2 0xb4000074203abce8 cached: 0/0M, 0/0% in use; allocs: 22, 86% recycled; transfers: 22, 82% unfetched
04-29 04:52:46.722 544 1086 D BufferPoolAccessor2.0: bufferpool2 0xb4000074203a9ed8 : 0(0 size) total buffers - 0(0 size) used buffers - 18/23 (recycle/alloc) - 5/23 (fetch/transfer)
04-29 04:52:46.722 544 1086 D BufferPoolAccessor2.0: Destruction - bufferpool2 0xb4000074203a9ed8 cached: 0/0M, 0/0% in use; allocs: 23, 78% recycled; transfers: 23, 78% unfetched
04-29 04:52:46.723 544 1086 D BufferPoolAccessor2.0: Destruction - bufferpool2 0xb4000074203a79d8 cached: 0/0M, 0/0% in use; allocs: 23, 78% recycled; transfers: 23, 78% unfetched
04-29 04:52:46.724 643 984 I WindowManager: WIN DEATH: Window{e30d8ca u0 com.byo.leak/crc6411a1d05040a4c684.MainActivity}
04-29 04:52:46.724 643 984 W InputManager-JNI: Input channel object 'e30d8ca com.byo.leak/crc6411a1d05040a4c684.MainActivity (client)' was disposed without first being removed with the input manager!
04-29 04:52:46.725 643 4914 W ActivityTaskManager: Force removing ActivityRecord{90686b u0 com.byo.leak/crc6411a1d05040a4c684.MainActivity t220}: app died, no saved state
04-29 04:52:46.733 643 4914 D CompatibilityChangeReporter: Compat change id reported: 181136395; UID 10069; state: DISABLED
04-29 04:52:46.733 643 4914 D CompatibilityChangeReporter: Compat change id reported: 174042936; UID 10069; state: DISABLED
04-29 04:52:46.734 643 4914 W ActivityTaskManager: Can't find TaskDisplayArea to determine support for multi window. Task id=220 attached=false
04-29 04:52:46.734 643 4914 W ActivityTaskManager: Can't find TaskDisplayArea to determine support for multi window. Task id=220 attached=false
04-29 04:52:46.734 335 335 E BpTransactionCompletedListener: Failed to transact (-32)
04-29 04:52:46.735 643 686 W ActivityManager: setHasOverlayUi called on unknown pid: 2464
04-29 04:52:46.739 643 686 V WindowManager: Unknown focus tokens, dropping reportFocusChanged
04-29 04:52:46.745 643 4916 E system_server: Can't open file: /sys/kernel/ion/total_heaps_kb
04-29 04:52:50.174 4916 4916 W audit : audit_lost=1160 audit_rate_limit=5 audit_backlog_limit=64
04-29 04:52:46.745 643 4916 E system_server: Can't open file: /sys/kernel/ion/total_pools_kb
04-29 04:52:50.174 4916 4916 E audit : rate limit exceeded
04-29 04:52:46.750 335 335 I BpBinder: onLastStrongRef automatically unlinking death recipients:
04-29 04:52:46.798 4935 4935 V Launcher: LauncherAppState initiated
04-29 04:52:46.820 643 4916 I ActivityManager: Low on memory:
04-29 04:52:46.821 643 4916 I ActivityManager: ntv ?? 37380: surfaceflinger (pid 335) native
04-29 04:52:46.821 643 4916 I ActivityManager: ntv ?? 23523: zygote (pid 412) native
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.