Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Configuration Parameters
SQL Reference
FAQ
In production environments, core dumps may occasionally occur due to program bugs or other unknown reasons. A core dump not only causes query execution failures but can also lead to cluster outages. Therefore, the generated core files are critical diagnostic artifacts and must be provided to developers for troubleshooting.
The packcore tool packages core dump files for debugging and analysis by development teams.
packcore is a Python utility distributed with YMatrix.
The tool is located at:
$GPHOME/sbin/packcore
Note that $GPHOME/sbin is not included in the environment variables; therefore, you must use its absolute path.
Usage example:
$GPHOME/sbin/packcore -b $GPHOME/bin/postgres postgres.core.4_1635732782.17213
Where:
-b $GPHOME/bin/postgres specifies the path of the executable binary. Worker processes are forked from the postgres master process. postgres.core.4_1635732782.17213 is the generated core file.After running the command, a compressed archive file (.tgz) with the same base name as the core file will be created in the current directory. Provide this archive to the development team. It contains the core file and relevant runtime environment information.
To use the packcore tool, the operating system must first generate core dump files.
Enable core dump generation by adjusting the following configurations:
Set the core dump size limit to unlimited:
ulimit -c unlimited
# To make the setting persistent
echo "ulimit -c unlimited" >> /etc/profile
Edit the sysctl configuration:
vi /etc/sysctl.conf
Append the following kernel.core_pattern=/home/mxadmin/%e.core.%s_%t entry to the end of the file.
Apply the configuration with:
sysctl -p
This setting determines the location and naming pattern of core files. The template supports placeholders such as: