Tool Security Protection Mechanism Triggered by Setting User Permissions Too High Causes the Profile Data Collection or Parsing Process to Stop

Symptom

The security protection mechanism of the performance analysis tool is triggered during execution when user permissions are excessively high, which leads to the termination of the profile data collection or parsing process.

Figure 1 Tool initialization failure because the tool's security protection mechanism is triggered when permission 777 is set for the Toolkit
Figure 2 Parsing process termination because the tool's security protection mechanism is triggered when permission 777 is set for msprof.py

Possible Cause

The user has set excessively high permissions for the CANN package, for example:

  • Set permission 777 for the Toolkit software package.
    chmod 777 -R /usr/local/Ascend/ascend-toolkit/
  • Set permission 777 for the lib64 directory of the Toolkit software.
    chmod 777 -R /usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/lib64/
  • Set permission 777 for the msprof.py file of the Toolkit software.
    chmod 777 /usr/local/Ascend/ascend-toolkit/latest/tools/profiler/profiler_tool/analysis/msprof/msprof.py

Troubleshooting

Lower the permissions on software packages, directories, or files.

  • Lower the permission on the Toolkit software package.
    chmod o-w -R /usr/local/Ascend/ascend-toolkit/
  • Lower the permission on the lib64 directory of the Toolkit software.
    chmod o-w -R /usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/lib64/
  • Lower the permission on the msprof.py file of the Toolkit software.
    chmod o-w /usr/local/Ascend/ascend-toolkit/latest/tools/profiler/profiler_tool/analysis/msprof/msprof.py