z/OS Dump Procedures

Generating a CEEDUMP

  1. Create the directory and where the dump will be placed. Then modify one of the following. Note that the directory must be created before the dump is created, and must have the correct permissions to be written into.

    • IHSROOT/bin/envvars

      Add the environment variable _CEE_DMPTARG=directory e.g.,

      export _CEE_DMPTARG=/tmp/dumpdir
      
    • httpd.conf

      Add the directive CoreDumpDirectory directory e.g.,

      CoreDumpDirectory /tmp/dumpdir
      
  2. Stop the server, e.g. bin/apachectl stop

  3. Start the server, e.g. bin/apachectl start

  4. Check the Server error log and make sure you don't see one of these messages, which would indicate that one of the steps above was skipped:

    [notice] Core file limit is 0; core dumps will be not be written for server crashes
    [notice] CoreDumpDirectory not set; core dumps may not be written for child process crashes

The _CEE_DMPTARG takes precedence over CoreDumpDirectory.  If neither is used then the dump may be located in:

  • The current working directory, if the directory is not the root directory (/), and the directory is writable

  • The directory found in environment variable TMPDIR (an environment variable that indicates the location of a temporary directory if it is not /tmp)

  • The /tmp directory

The name of the dump is CEEDUMP (or the name specified in the FNAME option of CEE3DMP) suffixed with: date.time.process ID. See CEEDUMP for additional information.

Generating a System Dump in a Batch Run-Time Environment

To generate a system dump in a batch run-time environment complete the following steps:

  1. Specify run-time options TERMTHDACT(UAONLY, UADUMP, UATRACE, or UAIMM), and TRAP(ON). If you specify the suboption UAIMM then you must set TRAP(ON,NOSPIE). The TERMTHDACT suboption determines the level of detail of the Language Environment formatted dump. It can  be specified on the CEEOPTS DD card, or with _CEE_RUNOPTS in the envvars file.

  2. Include a SYSMDUMP DD card with the desired dataset name and DCB information: LRECL=4160, BLKSIZE=4160, and RECFM=FBS.

  3. Rerun the program.

Example JCL proc:

//APACHSH JOB 'U=USER84=100',                                     
// CLASS=A,MSGLEVEL=(1,1),TIME=(5),REGION=2M                           
//APACHE   EXEC PGM=BPXBATCH,                                          
// PARM='SH /u/USERX/bin/apachectl start'             
//STDOUT   DD  PATH='/u/USERX/logs/stdout.txt',                       
//         PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU,SIRWXG)   
//STDERR   DD  PATH='/u/USERX/logs/stderr.txt',                       
//         PATHOPTS=(OWRONLY,OCREAT,OTRUNC),PATHMODE=(SIRWXU,SIRWXG)   
//STDENV   DD PATH='/u/USERX/bin/stdenv.txt'                          
//SYSMDUMP DD DSNAME=SYS1.DUMP02,                                      
//         UNIT=SYSDA,VOLUME=SER=CPDLB1,                               
//         DCB=(LRECL=4160,BLKSIZE=4160,RECFM=F),                      
//         DISP=(SHR,KEEP,CATLG)                                       

example run time options added to the envvars file specified by the //STDENV card:

 export _CEE_RUNOPTS=TER(UADUMP),ABTERMENC(ABEND)
 More information about TERMTHDACT or the ABTERMENC run-time option

Generating a System Dump in an OS/390 UNIX Shell

To generate a system dump from the OS/390 UNIX shell complete the following steps:

  1. Specify where to write the system dump

    • To write the system dump to an OS/390 dataset, issue the command or export the following in IHSROOT/bin/envvars:

      export _BPXK_MDUMP=filename      
      

      where filename is a fully qualified OS/390 dataset name with DCB information, LRECL=4160, BLKSIZE=4160, and RECFM=FBS, e.g.

      export _BPXK_MDUMP=hlq.mydump
      
    • To write the system dump to an HFS file, issue the command:

      export _BPXK_MDUMP=filename
      

      where filename is a fully qualified HFS filename, e.g.

      export _BPXK_MDUMP=/tmp/mydump.dmp
      
  2. Specify Language Environment run-time options in IHSROOT/bin/envvars:

    export _CEE_RUNOPTS="termthdact(suboption)"
    

    where suboption =UAONLY, UADUMP, UATRACE, or UAIMM. If UAIMM is set, TRAP(ON,NOSPIE) must also be set. The TERMTHDACT suboption determines the level of detail of the Language Environment formatted dump.

    example run time options added to the envvars file specified by the //STDENV card:

    export _CEE_RUNOPTS=TER(UADUMP),ABTERMENC(ABEND)
    More information about TERMTHDACT or the ABTERMENC run-time option
    
  3. Rerun the program.

    The system dump is written to the dataset name or HFS filename specified. See UNIX System Services Command Reference for additional BPXK_MDUMP information.

What's in the error log, and using other diagnostic modules:

In addition to dumps,  mod_backtrace and mod_whatkilledus can be used to obtain synopsis information in the error log.

Example of basic records in the error log for a SIGSEGV (without the other diagnostic modules):

    CEE3204S The system detected a protection exception (System Completion Code=0C4).  
    CEE5203S The signal SIGSEGV was received.  
             From entry point generate_sig at compile unit offset
    +000000000A7A470E at entry offset +00000000000001E6  
     at address 000000000A7A470E.  
    [Tue Dec 05 08:57:43 2006] [notice] child pid 438 exit signal Segmentation fault (11)