How to Manually Gather and Bundle GroupWise Core Files Using 'GDB'

  • 7000002
  • 11-Apr-2008
  • 30-Apr-2012

Environment

Novell GroupWise 7
Novell Open Enterprise Server (Linux based)
Novell SUSE Linux Enterprise Server 9
Novell SUSE Linux Enterprise Server 10

Situation

gdb - The Gnu Project Debugger

The 'gdb' process is able to attach to existing PIDs and generate core files based on what it sees within the process.
This usually requires that the process be running or in a hung state at the time of the manual core generation.
The other part of the procedure includes the novell-getcore script.
The 'novell-getcore' script bundles the dependent files associated with the debugged process so that development may more easily retrieve information regarding the problem. The end result of these exercises should be a tarball containing both the core file and dependent files.
To prepare to receive a core from a process that is dying, please reference TID 3447847 - How to prepare for and obtain a GroupWise Agent or Gateway core file on Linux.

Resolution

Example Problem: The GroupWise Internet Agent (gwia) is hanging at various intervals, but will not automatically create a core file.

Setting Up for the Core File

Change the 'ulimit' parameter to be unlimited which will allow a core file of any size to be written.
Most cores are relatively small in comparison to the amount of free space on disk.

Type ulimit -u unlimited at a terminal prompt.


Gathering the Core File
• Make sure GDB is installed by typing gdb --version at the terminal prompt.

EX: GNU gdb 6.6

• Grep for the GroupWise pid:
pgrep

EX: pgrep gwia

[The process will be associated with a number and may look similar to:

• Attach to the running process with gdb:
gdb -p

EX: gdb -p 5425

[This launches the gdb app debugger console.]

• In the debugger console type:
gcore

[This will create a core. of the running process in your current working directory.
In the example, the core file is called 'core.5425'.]

Then type:
quit ... and then choose 'Yes' to fully exit the debugger.


Bundling the Core File

Use novell-getcore

• The novell-getcore script can be downloaded from the Novell site.

• Create a bundle:
./novell-getcore -b ./core. /agent_working_directory

EX: ./novell-getcore -b ./core.5425 /opt/novell/groupwise/agents/bin/gwia

[This will pull both the core file and the application's dependent files from the directory structure.
It then creates a tarball with all the information hopefully needed to diagnose an application's behavior.]

EX: core_20080410_152826_linux_gwia_servername.tar.gz

• Upload this file to ftp.novell.com/incoming and notify Novell Technical Support of the file name once the file is fully uploaded.

Additional Information

This TID discusses how to set up for and gather core files from Unix-based systems.
It is a good reference to follow in case 'gdb' is not functioning properly.
Theoretically, the Gnu Debugger Tool should be able to attach to applications and create the necessary core files at will.
In some instances, however, this may not occur and extra steps must be taken. The referenced TID covers most or all of these.