Product Documentation
Virtuoso Studio Design Environment User Guide
Product Version IC23.1, November 2023

Crash Report Customization

The following name-value pairs can be set for the CDS_ERRORLOG environment variable to customize crash report behavior. You only need to specify a value if you want to override the default.

Name-Value Pair Description

EXTENDED=TRUE

If set to TRUE/YES, additional system information gets recorded for analysis (including the values for of .cdsenv variables, for all loaded tools, that differ from their default values).

The default setting is TRUE/YES.

ALWAYS=NO

If set to TRUE/YES, the debug information always gets created and the Fatal Application Error dialog no longer required to be displayed.

The default setting is NO/FALSE.

STARTINFO_FILE=abcd.out

Used to log each session start. Specify the name of the file to log each session start/end.

SCRIPT

Executes the shell/script file of a user when any application crashes. You can set the variable as:

setenv CDS_ERRORLOG "SCRIPT=<directory path>/<file name>.sh"

The user script file passes the following arguments:

-status <exit_status> 
-log <path_to_CDS.log_file> 
-t  <crash_time> 
-dir <log_directory> 
-exe <path_to_application_binary>

DIR=.

Used to set the directory that reports are to be saved in.

If you have specified a directory that does not currently exist, this directory gets created automatically in this case.

If this environment variable is not set, reports gets saved to “/tmp” (the name generated by cdsGetTmpDir()) by default.

AUTO_DIR=<path>

If this environment variable is set, crash reporter creates a directory <path> and all crash logs are stored in <path>/year_month.

For example:

>setenv CDS_ERRORLOG "AUTO_DIR=autoDir"
>ls -a autoDir/16_12/
=> total 24
drwxrwxrwx 2 user cadence10 4096 Dec  8 19:18 .
drwxrwxr-x 3 user cadence10 4096 Dec  8 19:18 ..
-rw-r--r-- 1 user cadence10 5485 Dec  8 19:18 crashReport_120816_191828_IC6.1.8-64b.500.8_user_msc075.cadence.com.log
-rw-rw-rw- 1 user cadence10 4252 Dec  8 19:18 crashReport_120816_191828_IC6.1.8-64b.500.8_user_msc075.cadence.com.log.CDS.log

If AUTO_DIR or DIR environment variables are not set, reports gets saved to “/tmp” (the name generated by cdsGetTmpDir()) by default.

ALL_ERRORS=TRUE

Generates crash reports.

This value does not work for SIGTERM, SIGHUP, SIGALRM, and XIO errors that can cause Virtuoso to crash. Additional information regarding these signals is added to the CDS.log file before Virtuoso exits. This additional information describes the event that occurred, the state of the Virtuoso process, and the state of the host machine.

It is recommended to use the Health Monitor tool to gather information about issues with a Virtuoso process, instead of sending signals to terminate the Virtuoso application, and then reporting it as a crash.

NAME_FMT=%PID.log

Used to define the report name.

USE_DEBUGGER=YES

Attempts to attach the platform debugger on application crash to get additional stack information.

The default setting is TRUE/YES.

If USE_DEBUGGER has been set to YES, but no debugger has been set in the path, then the crash report informs that a debugger was not available on exit.

debug:Warning : no platform debugger found debug:Check your system configuration

CDS_CRASH_DBG_SCRIPT

You can specify a different third-party platform debugger using the CDS_CRASH_DBG_SCRIPT environment variable to get additional stack information when an application crashes.

setenv CDS_CRASH_DBG_SCRIPT "/opt/install/ bin/my_debug.sh %PID %PROGRAM"

For example:

# example of user-defined “my_debug.sh” script
# this script is passed 2 arguments: path to the binary ($1)
# and process PID ($2)
# It is possible to use a third-part program (debugger or
# any other program that can print the stack trace)
/bin/sh
program=$1
pid=$2
/opt/install/debuggers/dbx/latest/dbx -q -nx ${program} ${pid} << EOF 2>1
set prompt
where
detach
quit
EOF 

In case the user debugger cannot start, the following message is added to the crash report:

CDS_CRASH_DBG_SCRIPT was not started

DISABLED=NO

Disables the use of crash reporting so that no crash dialog is displayed nor a crash report generated.

The default setting is FALSE/NO.

SAVELOGS=ONCRASH

Lets you specify that virtuoso calls the saveCdsLog.pl log collection script at any exit, or only on crash, to automatically save the current CDS.log.

Accepted values are: ALWAYS/ONCRASH/OFF. The default is ONCRASH which saves a copy of CDS.log to the crash directory on exit.

SIGTERM=TRUE

Lets you terminate the Virtuoso application. This name-value pair allows Virtuoso to release resources and save its state, if appropriate.

The default value is FALSE.

LOG_EMAIL

In case the session crashes (that is, a non-zero exit), sends a system-generated e-mail notification to all the e-mail addresses specified for a listed application.

The format of the e-mail is as follows:

To: <application1>:<address1,address2>,<application2>:<address3,address4>

Subject: Virtuoso log info for host:<hostname> (lnx86)

The content of the e-mail is as follows:

INST_ROOT: <Installation root of the product>

VERSION:<Product version>

USER: <User name>

TIME: <Timestamp of the crash>

REPORT: <Path of the crash report>

LOG: <Path of the CDS.log file>

SIGNAL: <Signame# and its description>

If $CDS_ERRORLOG LOG_EMAIL=<E-Mail list> is set, then in case of application crash, the first 50 lines of CDS.log comes as an attachment in an e-mail.

For example:

setenv CDS_ERRORLOG "SAVELOGS=ONCRASH EXTENDED=TRUE ALWAYS=NO STARTINFO_FILE=/home/genel/startTimes_`date +%b%Y` DIR=/home/genel/crashes NAME_FMT=crashReport_%DATE_%TIME_%SUBVERSION_%USER_%HOST.log USE_DEBUGGER=YES DISABLED=NO LOG_EMAIL=virtuoso:nicolay@cadence.com,xyz@customer.com,viva:pqr@cad.customer2.com,hello@world.com"

Any values set should not contain any spaces.

Older versions of debuggers, such as GDB, may not correctly handle code that has been built using gcc4.4. This can result in incomplete stack traces being generated. It is therefore recommended that $PATH be set to the latest version of GDB or DBX, for example.If there is no debugger in the path, then no debug data gets included in the crash report.

The crash detector debugger can also be used to check the $DEBUGGER variable, and, if it is defined, it can attach it to the current process (even if USE_DEBUGGER has not been set). For example:

setenv DEBUGGER /opt/gdb/6.8/bin/gdb (where the latest version of GDB is specified)

In case of application crash, the crash detector also checks for the sender of the kill signal. If the signal is sent by any user, then the crash detector is triggered only when the following variable is set:

$CDS_ERRORLOG="ALL_ERRORS=YES"

Also, in the CDS.log file, one of the following statements get appended:

You can run cdsLibDebug and cdsinfo commands to add more information in the generated crash report. The cdsLibDebug command enables you to get a list of cds.lib files and library definitions. In addition, it enables you to find syntax errors in cds.lib files. Whereas, the cdsinfo command provides detailed information on design libraries, such as DMTYPE or NAMESPACE. The DMTYPE library is used with design management system and NAMESPACE is used with CDBA or OA.

Related Topics

Additional Crash Data Collection

Crash Trend Reporting

Crash Report Data Storage

Health Monitor Overview

Viewing the cds.lib Updates


Return to top
 ⠀
X