This article discusses a utility script "packcore" that collects all of the necessary files to analyze a core file generated by Greenplum.
There are currently two ways to get the Packcore from the system:
Run GMPT on the server where the core file is located. The packcore tar archive and the gp_log_collector archive needs to be sent to Tanzu Support.
Note: The "gpmt" utility is called "gpsupport" in Greenplum 7.x
[gpadmin@mdw ~]$./gpmt packcore --help USAGE: ./gpmt packcore -cmd COMMAND -core COREFILE [ -binary BINARY ] [ -keep_tmp_dir ] [ -ignore_missing ]
Description: Packcore takes a core file, extracts the name of the binary which generated the core. It gathers the required shared libraries and packages into a single tarball archive.
Note: Packcore should be executed on the host where the core file was generated. The same PATH and LD_LIBRARY_PATH should be set in order to collect the correct binary and shared libraries.
collect
- Collect core file and associated libraries-core
- Corefile-binary
- Binary-keep_tmp_dir
- Do not delete temp directory-ignore_missing
- Ignore missing librariesa. Collect core info for 'core.1234' with verbose logging (binary will be automatically detected).
./gpmt packcore -cmd collect -core core.1234 -verbose
b. Collect core info for 'core.1234' with binary '/usr/local/greenplum-db/postgres'
./gpmt packcore -cmd collect -core core.1234 -binary /usr/local/greenplum-db/postgres
The following are instructions to use the Packore utility:
1. Use $GPHOME/sbin/packcore
.
2. To collect a core file, run the command: packcore <core_file>
where <core_file>
is the path to the core file to be collected.
$GPHOME/sbin/packcore corefile OR ./packcore corefile
3. The script will run, copying the core file, libraries, and other information to the local directory. Once finished, it will create a tar file as shown below:
packcore-<core_file>.tgz
4. Send the compressed tar file to Tanzu support.
The following is an example of Packcore generation and the information that gets collected:
[gpadmin@mdw ~]$ $GPHOME/sbin/packcore core.3326 Unable to find full path to binary for core file <<<<<< In case of this issue we have to give binary path as shown below. [gpadmin@mdw ~]$ ps -ef | grep silent gpadmin 3326 1 0 May10 ? 00:00:02 /usr/local/greenplum-db-4.3.8.0/bin/postgres -D /data/master/gpseg-1 -p 5432 -b 1 -z 8 --silent-mode=true -i -M master -C -1 -x 0 -E [gpadmin@mdw ~]$ $GPHOME/sbin/packcore core.3326 -b /usr/local/greenplum-db-4.3.8.0/bin/postgres [gpadmin@mdw ~]$ ls -lrth | tail -2 -rw-rw-r--. 1 gpadmin gpadmin 335M May 18 10:23 core.3326 -rw-rw-r--. 1 gpadmin gpadmin 148M May 18 10:25 packcore-core.3326.tgz [gpadmin@mdw ~]$ tar -xzf packcore-core.3326.tgz [gpadmin@mdw ~]$ cd packcore-core.3326 [gpadmin@mdw packcore-core.3326]$ ls -lrth total 386M -rw-rw-r--. 1 gpadmin gpadmin 22 May 18 10:24 uname.out -rw-r--r--. 1 gpadmin gpadmin 27 May 18 10:24 system-release -rw-r--r--. 1 gpadmin gpadmin 27 May 18 10:24 redhat-release -rwxr-xr-x. 1 gpadmin gpadmin 52M May 18 10:24 postgres -rw-rw-r--. 1 gpadmin gpadmin 335M May 18 10:24 core.3326 -rw-r--r--. 1 gpadmin gpadmin 27 May 18 10:24 centos-release drwxrwxr-x. 3 gpadmin gpadmin 4.0K May 18 10:24 usr -rwxr-xr-x. 1 gpadmin gpadmin 150 May 18 10:24 runGDB.sh drwxrwxr-x. 2 gpadmin gpadmin 4.0K May 18 10:24 lib64