[Gluster-infra] Change in capturing coredumps during patch regression
srangana at redhat.com
Thu Jul 3 15:20:35 UTC 2014
One of the recent problems posted on gluster-devel regarding the ability to view coredumps that occur during regression testing for patch acceptance was discussed here .
Towards this, the core collection is now modified to collect system libraries that were used by the executable that cored, so as to facilitate debugging better. 
To see the core in all its glory, please use the following method (this is echoed on the regression console as well, where the core URL is printed),
- Download and extract the core tarball to any suitable location (for this discussion, say /home/user/cores/regressioncore)
- cd to, the extracted directory (cd /home/user/cores/regressioncore)
- You would now (usually) see the following directories here, build usr lib64
- Determine which core you want to open (assuming there are more than one) and which target it belongs to (like glusterd, glusterfsd etc.)
- Open the core as, gdb -ex 'set sysroot ./' -ex 'core-file ./build/install/cores/core.xxx' <path to target (say ./build/install/sbin/glusterd)
The above should now display required symbol information and related data using the libraries from the regression machine and help debug the core better.
As a cross check use 'info sharedlibrary' inside gdb to check if all shared libraries are available and loaded based on the sysroot set.
An alternate to the above mechanism would be to simply launch gdb and go in series with the commands, 'set sysroot ./' -> 'target exec <target>' -> 'target core <core>'.
Further enhancement for interested readers,
- We can enhance the core collection to not package all of gluster libraries and executable, but just those that are involved in the crash, this can help reduce the size of the core tarball to a good extent (and extend its shelf life on the regression machines for examination).
- The current bash script changes (in ) can be improved upon (for sure) by experienced bash script writers :)
More information about the Gluster-infra