Creating a Memory Overwriting Diagnosis Task
The tool analyzes memory overwriting of applications, provides memory overwriting types and memory access information, and associates the call stacks and source code.
Prerequisites
No nodes are in the Offline state.
Procedure
- Click
next to System Diagnosis. - Set task parameters by referring to "Task Management" and Table 1.Figure 1 Creating a memory diagnosis task
Table 1 Parameters for creating a memory overwriting diagnosis task Parameter
Description
Task Name
Name of the task. The name must meet the following requirements:
- Contain only letters, digits, and special characters (including @#$ %^&*()[]<>._-!-+ and spaces). The name cannot start or end with a space.
- Contain 1 to 32 characters.
Diagnosis Object
Select Memory.
Select Nodes
Select the nodes to be analyzed. If there is only one node, this node is selected by default. A maximum of 10 nodes can be selected at a time.
Mode
Select Launch application.
Diagnosis Scenario
Diagnosis analysis type. Select Memory overwriting.
Application Path
Absolute path of the target application to be analyzed on the server. For example, to analyze the loop_test application stored in the /home/test directory, enter /home/test/loop_test.
NOTE:- By default, applications in the /opt/ or /home/ directory are analyzed. The administrator can click
> Tool Settings in the upper right corner on the home page of the System Diagnosis and choose System Settings, and enter application paths in the Application Path test box. Use semicolons (;) to separate multiple application paths. Only administrators can modify this parameter. Common users can only view this parameter. - The OS running user (devkitworker1) must have the execute permission on the application paths and the read and execute permissions on the applications to be analyzed.
(Optional) Application Parameters
Set application parameters based on the actual scenario.
(Optional) Application User
This parameter is available when Launch application is selected. By default, this parameter is disabled.
- Disabled: The application running user is the default system user devkitworker1.
- Enabled: The application user is the configured user.
Name
System user to run the application. This parameter is mandatory when Application User is enabled.
Password
Password of the system user. This parameter is mandatory when Application User is enabled.
(Optional) C/C++ Source File Path
Absolute path of the C/C++ source file on the server. This parameter can be set in Advanced Settings.
NOTE:- The source code of the application must comply with the general programming specifications. Otherwise, the source code of hotspot functions in the analysis result may not be displayed properly.
- You can use this parameter to import the source code of an application to view the performance data after the source code and assembly instructions are mapped.
Stop Analysis After Exception Occurs
Set whether to stop the task when the application encounters an exception. This option is enabled by default, that is, the task is stopped in case of an exception. If you want to continue the analysis in case of an exception, add the -fsanitize-recover=address setting when compiling the application. This parameter can be set in Advanced Settings.
Configure Node Parameters
Configures parameters on the specified node. This option is disabled by default. When multiple nodes are selected for analysis, you can configure this option in Advanced Settings.
Size of the Collected File (MiB)
You can set the size of the file to be collected to prevent long analysis time caused by large file size. The default value is 100. The value ranges from 1 to 100.
- Click OK.
You can click the icons next to the task name to perform the following operations:
: stops the analysis task. After an analysis task is stopped, the collected information will be deleted.
: restarts the analysis task. You can modify task parameter settings and restart an analysis task. This button is available when a task is canceled or fails.
: runs the analysis task again. The analysis task is renamed and restarted.
: deletes the analysis task. After a task is deleted, all data of this task will be deleted. Exercise caution when performing this operation.
: changes the task or report name. The report naming rule is the same as that of a task.
The collection and analysis task will not be interrupted if you exit or switch to another page.
After being authenticated, you can log in to the system again to view the execution progress of an ongoing task or the analysis report of a completed task.