What Do I Do if MindStudio Is Blocked When Being Used on Linux but Recovers After an Uncertain Period of Time?
Symptom
- During MindStudio startup, the GUI does not respond, and the console is blocked in the log output "WARN - o.ssh.connection.utils.KMCUtil - start init kmc."
- MindStudio is blocked when being used, and the error message "WARN - o.ssh.connection.utils.KMCUtil - kmc warn entropy may not enough, entropy_avil=2, read_wakeup_threshold=64" is printed in the /root/.cache/Huawei/MindStudioMS-x.x/log/idea.log file.
Possible Cause
A password has been set and saved on the SSH connection configuration page. See Figure 1. The SSH plugin uses the KMC encryption suite to store passwords. However, the principle for /dev/random to generate random numbers is to use the random pool of the current system to calculate a fixed number of random bits, and then return these bits as byte streams. The random pool is the environment noise of the current system. "Random" indicates the degree of chaos of a system. The system noise can be evaluated by using many parameters, such as memory usage, file usage, and number of processes of different types. If the noise in the current environment does not change violently or is small, for example, the random numbers generated when the device is just started are insufficient, /dev/random blocks the current program until new random bytes are generated by the pool. When the random number source is insufficient, the haveged component is a feasible solution.
Solution
Add the haveged service to solve the random number blocking problem.
- Check whether the haveged service is installed in the OS.
- For CentOS, openEuler, EulerOS, and Kylin OS, run the following command:
/bin/rpm -qa | grep -w "haveged"
- For the Ubuntu OS, run the following command:
dpkg -l | grep -w "haveged"
If no command output is displayed, the haveged service ha not been installed.
- For CentOS, openEuler, EulerOS, and Kylin OS, run the following command:
- Install the haveged service.
- For CentOS, openEuler, EulerOS, and Kylin OS, run the following command:
sudo yum install haveged
- For the Ubuntu OS, run the following command:
sudo apt-get install haveged
- For CentOS, openEuler, EulerOS, and Kylin OS, run the following command:
- Check whether the service has been started.
systemctl status haveged.service
- If the command output contains "Active: active (running)", the service has been started.
- If the command output contains "Active: inactive (dead)", the service has not been started. Run the following command to start the service:
systemctl start haveged.service
- Enable automatic start of the service during system startup.
systemctl enable haveged.service

