KernelSU Unresponsive Behavior When Interrupting Script Execution
in Post with 0 comment

During the execution of a certain script within KernelSU, specifically one involving `clash.sh` and network connectivity checks, users have reported inconsistent behavior when attempting to exit the process using the back button. Occasionally, this leads to KernelSU becoming unresponsive, displaying errors related to kernel module support, or presenting a disordered module list. Exiting the KernelSU application and relaunching resolves this issue.

This problem appears to be triggered when the execution of the script is interrupted prematurely, likely causing state inconsistencies within KernelSU.

Detailed steps to reproduce this issue are as follows:

1. Navigate to the KernelSU interface.
2. Execute the script containing the following commands:
```
source /data/clash/clash.env
pid=$(curl -sL http://127.0.0.1:${Clash_ui_port} | grep hello)
if [[ "${pid}" ]]; then
echo "正在停止akashaProxy."/data/clash/scripts/clash.service -k &&& /data/clash/scripts/clash.iptables -k
else
echo "正在启动akashaProxy."/data/clash/scripts/clash.service -s &&& /data/clash/scripts/clash.iptables -s
fi
```
3. While the script is actively running, attempt to return to the previous screen using the back button.
4. Observe the potential for KernelSU to freeze, display module errors, or present a scrambled module list.
5. Force close KernelSU and relaunch the application to restore normal functionality.

A bug report containing system logs and further details is available here: [link to bug report].

Investigating the exact cause of this behavior and implementing a solution to prevent it is crucial for enhancing KernelSU's stability and user experience.

The article has been posted for too long and comments have been automatically closed.