6.14.5. Setting up memory dump generation
6.14.5.1. On Windows
This section contains an example of the technological log configuration file (logcfg.xml) that enables crash dump creation.
<config xmlns="http://v8.1c.ru/v8/tech-log"> <dump location="C:\Program Files\1cv8\dumps" create="1" type="3"/> </config>
The memory dumps will be saved to the C:\Program Files\1cv8\dumps directory and will include the entire process memory contents plus an additional data segment.
The user on whose behalf the client application is running or the server must have full rights to the directories:
- Temporary files directory
- Technological log directory
- Dumps directory
The user on whose behalf the client application is running or the server must have the right to read the directories:
- Configuration files directory
- Directory that owns the dumps directory
If in the logcfg.xml file, you configured to receive query plans, such a file is to be located in the configuration file directory of the relevant application:
- For client-server mode: in the directory of configuration files available to 1C:Enterprise server.
- For file mode with direct connection: in the directory of configuration files available to the required client application version.
- For file mode with connection via web server: in the directory of configuration files available to the extension of the web server hosting this infobase.
6.14.5.2. On Linux
This section describes the steps to configure Linux to enable generation of crash memory dumps.
NOTE. The recommendations in this section are fully applicable to Fedora Core 4 and similar versions. For other Linux versions, the name and syntax of the commands described here may be different. For details, refer to the help system of your Linux version.
By default, crash dumps are disabled. Suppliers of Linux distributions recommend that you enable creation of dumps only on computers intended for development rather than on computers for operating the application.
6.14.5.2.1. Enabling automatic generation of dumps
Generation of crash dumps is configured for all processes executed on behalf of a specific user. In order to enable automatic generation of dumps, add the following lines to the /etc/security/limits.conf file:
<username> soft core unlimited <username> hard core unlimited
Where <username> is the name of the user on whose behalf the 1C:Enterprise application is running.
6.14.5.2.2. Defining the name and location of dumps
To ensure clear understanding which crash dump is related to which process and to keep the dumps in a specific directory, it is recommended that you set a dump name generation template. The template can be specified for a single session or permanently.
IMPORTANT! Applying settings described in this section affects all processes of all OS users. This means that crash dumps of other users (if enabled) will be saved to the specified path using the selected name template.
IMPORTANT! Actions described below require superuser rights (root).
To set a name template and location for crash dumps, use the command:
sysctl -w kernel.core_pattern=/tmp/core.%e.%p
This setting will be valid until the computer is restarted. In the above example, the dumps will be placed in the /tmp directory and the names of the dumps will be generated from:
- core prefix
- Name of the executable file
- ID of the process that initiated crash dump generation
To apply the name template and the path on the permanent basis, you must add the following line to the /etc/sysctl.conf file:
kernel.core_pattern=/tmp/core.%e.%p
For the changes to take effect, run the command:
sysctl -p
The path specified in the settings must be allowed for writing for the users on whose behalf the applications that generate crash dumps are running.
6.14.5.3. On macOS
6.14.5.3.1. General information
This section describes the steps to configure macOS to enable generation of crash memory dumps.
By default, crash dumps are disabled.
6.14.5.3.2. Enabling automatic generation of dumps
Generation of crash dumps is configured for all processes. To enable automatic generation of dumps, run the following command on behalf of a user with administrative rights:
sudo launchctl limit core unlimited
The command is valid until the computer is restarted.
6.14.5.3.3. Determining dump names and location
The crash dumps are placed in the /cores/ directory. The file name looks like this: core.<process PID>. <process PID> is the identifier of the operating system process that terminated abnormally.