SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
15.38k stars 1.89k forks source link

High Memory Usage, Excessive Battery Drain, and Overheating in sing-box v1.9.0+ and v1.10.0+ on Android #1833

Closed Hiiirad closed 3 weeks ago

Hiiirad commented 3 weeks ago

Operating system

Android

System version

Android 14

Installation type

sing-box for Android Graphical Client

If you are using a graphical client, please provide the version of the client.

v1.9.0

Version

No response

Description

When I use the sing-box on my Android phone, the memory usage should be less than 40 MB, but it exceeds 400 MB. Additionally, the number of goroutines and inbound traffic reaches up to 20,000. Moreover, the battery usage becomes excessive, and the sing-box application drains the battery quickly. It's worth noting that this issue did not occur in versions prior to v1.9.0. photo_2024-05-27_22-07-00 photo_2024-05-28_23-45-46 photo_2024-05-27_22-16-30 photo_2024-05-28_10-45-56 photo_2024-05-28_11-45-12 photo_2024-05-28_11-45-12 (2) photo_2024-05-28_11-45-12 (3) photo_2024-05-28_12-56-22

Reproduction

Reproducing the issue is straightforward. Connect to the application using WiFi or cellular data, and after a few moments, the issue occurs and the phone gets hot. This problem happens more frequently when using cellular data.

Logs

No response

Supporter

Integrity requirements

dyhkwong commented 3 weeks ago

For memory usage issue, provide pprof file or this will get closed.

Hiiirad commented 3 weeks ago

How can I provide pprof file for you?