[Magisk] devsk:
Process storm from magisk_daemon on HTC U11+

Any idea why we have so many processes spawned? Looks like a fork leak somewhere.

htc_ocmdugl:/sdcard # ps -Af | grep 638 | wc
6248 49986 374881
htc_ocmdugl:/sdcard # ps -Af | grep 638 | head
root 638 1 5 19:18:22 ? 00:00:48 magisk_daemon -daemon
root 641 638 0 19:18:22 ? 00:00:00 [logcat]
root 3317 638 0 19:19:00 ? 00:00:00 [logcat]
root 3324 638 0 19:19:00 ? 00:00:00 [logcat]
root 3336 638 0 19:19:00 ? 00:00:00 [logcat]
root 3341 638 0 19:19:00 ? 00:00:00 [logcat]
root 3344 638 0 19:19:00 ? 00:00:00 [logcat]
root 3350 638 0 19:19:00 ? 00:00:00 [logcat]
root 3360 638 0 19:19:00 ? 00:00:00 [logcat]
root 3367 638 0 19:19:00 ? 00:00:00 [logcat]
htc_ocmdugl:/sdcard # ps -Af | grep 638 | wc
7336 58861 441201

---------- Post added at 07:41 PM ---------- Previous post was at 07:36 PM ----------

I really need help with this. The system is just killing itself. All of these processes are becoming zombies. I have about 12000 zombie processes right now.

---------- Post added at 07:53 PM ---------- Previous post was at 07:41 PM ----------

Is there a way I can coerce Magisk to not create 10 logcat processes every 2 seconds? Anything I can do to work around this issue? I don't know what is it that its trying to do. I will need to uninstall this thing otherwise, which I don't want to do.

---------- Post added at 07:56 PM ---------- Previous post was at 07:53 PM ----------

It seems to be spawning a bunch of

17165 root 20 0 8.9M 1.6M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17162 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17159 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17156 root 20 0 8.9M 1.7M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17153 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17150 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17147 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17144 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17141 root 20 0 8.9M 1.6M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17138 root 20 0 8.9M 1.6M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17135 root 20 0 8.9M 1.7M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17131 root 20 0 8.9M 1.7M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17129 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17125 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17123 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17120 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17117 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17114 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17111 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17108 root 20 0 8.9M 1.7M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17105 root 20 0 8.9M 1.6M 1.1M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17102 root 20 0 8.9M 1.7M 1.2M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk
17099 root 20 0 8.9M 1.4M 1.0M S 0.0 0.0 0:00.01 logcat -b all -v threadtime -s am_proc_start Magisk

what is the intent?

---------- Post added at 08:14 PM ---------- Previous post was at 07:56 PM ----------

I think I found the issue. It looks like magisk is looking for something in the logcat and if the logcat is rotated, it keeps on doing that blocking filter on logcat, which will never succeed.

This is a bug. If Magisk depends on logcat, it should enforce logcat enlargement by setting correct logcat size at system level. Or it should not depend on it. At minimum, it should not DOS the phone like this with process storm.

Any ideas how I can get in touch with [MENTION=4470081]topjohnwu[/MENTION] for bugs?