# Get information about the libraries used by a failed Platform component

If a Platform component fails in a Linux environment, you’ll need to obtain information about the libraries used by the component. This information is essential for interpreting the contents of the core dump file. Here’s how to obtain it.

 Caplin strongly advise you automate gathering this information, as it speeds up the process of raising a support ticket if you need Caplin Support to investigate the component failure.

1. Install the GNU Debugger (GDB) on the machine where the crash occurred.

2. Run the command below to analyse the component’s core dump file:

``$gdb <path-to-core-dump-file>`` The location of the core dump file varies depending on the component: • Liberator: `<Framework-root>/servers/Liberator/core.<pid>` • Transformer: `<Framework-root>/servers/Transformer/core.<pid>` • C-based integration adapter: `<Framework-root>/kits/<adapter-blade-name>/latest/core.<pid>` 3. From the GDB’s interactive command line, type the following command: `info sharedlibrary` GDB outputs a library analysis, something like this (this example is for a Liberator crash): ```(gdb) info sharedlibrary From To Syms Read Shared Object Library 0x0000003597405760 0x00000035974110c8 Yes (*) /lib64/libpthread.so.0 0x0000003596c00de0 0x0000003596c01998 Yes (*) /lib64/libdl.so.2 0x0000003598003e70 0x0000003598043fb8 Yes (*) /lib64/libm.so.6 0x0000003598c02910 0x0000003598c12f78 Yes (*) /lib64/libgcc_s.so.1 0x000000359701eaa0 0x00000035971400cc Yes (*) /lib64/libc.so.6 0x0000003596800b00 0x00000035968199cb Yes (*) /lib64/ld-linux-x86-64.so.2 No /opt/fxsw/jdk/current/jre/lib/amd64/server/libjvm.so 0x0000003597802140 0x00000035978054e8 Yes (*) /lib64/librt.so.1 No /opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libverify.so No /opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libjava.so 0x00007f7638de51f0 0x00007f7638ded648 Yes (*) /lib64/libnss_files.so.2 No /lib64/libnss_ldap.so.2 No /opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libzip.so 0x00007f762002e000 0x00007f7620031328 Yes (*) /lib64/libnss_dns.so.2 0x0000003599003930 0x0000003599012998 Yes (*) /lib64/libresolv.so.2 No /opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib/javaauth.so No /opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libnio.so No /opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libnet.so No /opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib//snapshot.so No /opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib/libqdbm.so No BIAS``` `(``)`* means that debugging information is missing for that particular shared library. 4. Copy the above output into a file, such as `gdb-libs-list.out` 5. Run the following `grep` and `awk` commands on the `.out` file: ``$ grep "Yes\|No" ./gdb-libs-list.out | awk '{if ($5 != "")print$5}' &> libs-list.txt``

This produces a file called `libs-list.txt` that lists just the shared library files.

For example:

```/lib64/libpthread.so.0
/lib64/libdl.so.2
/lib64/libm.so.6
/lib64/libgcc_s.so.1
/lib64/libc.so.6
/lib64/ld-linux-x86-64.so.2
/opt/fxsw/jdk/current/jre/lib/amd64/server/libjvm.so
/lib64/librt.so.1
/opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libverify.so
/opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libjava.so
/lib64/libnss_files.so.2
/lib64/libnss_ldap.so.2
/opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libzip.so
/lib64/libnss_dns.so.2
/lib64/libresolv.so.2
/opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib/javaauth.so
/opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libnio.so
/opt/fxsw/jdk/jdk1.7.0_65/jre/lib/amd64/libnet.so
/opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib//snapshot.so
/opt/run/iddprd/caplin/DeploymentFramework-6.2.0-295123/servers/Liberator/lib/libqdbm.so```
6. Create a tar file containing all the required information:

``\$ cat libs-list.txt | sed "s/\/\.\.\//\//g" | xargs tar -chvf `hostname`-libs-list.tar``

The name of the tar file is prefixed with the name of the machine the crash took place on. The file contains the full list of the required libraries, complete with the directory structure and all symlinks.

7. Attach this tar file to the Caplin support ticket raised for the crash investigation.