Salesforce

How to attach to a process using DBX

« Go Back

Information

 
TitleHow to attach to a process using DBX
URL NameP27476
Article Number000128627
EnvironmentUNIX
Progress/OpenEdge Product Family
Question/Problem Description
How to attach to a process using AIX's DBX tool?
How to debug a running process on AIX?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
In some situations a process will not generate a core file appropriately on exit.
In situations where a specific series of actions is known to trigger errors which will lead to a process termination it may be possible to use dbx to get stack information from the point when the process died.

If the dbx debug executable exists on the system it may be possible to connect to the process in memory to gather the same information that might be outputted from a crash.

To connect DBX to a process perform the following:

1. L
og into the system as root.

2. Launch the dbx command:

 

dbx -a PID# <path upto and including Progress executable> | tee dbx.out


PID# is the PID of the process to connect to. 
<path upto and including Progress executable> is the full path to the Progress executable to connect to.

 

For example if researching a problem and the below was in the process list:

username 38744 1 2 17:02:55 - 0:00 /usr1/aix/dlc/bin/_mprosrv ibm91c

38744 is the PID and /usr1/aix/dlc/bin/_mprosrv is the full path to and including the executable

The following command would be issued:

 

 dbx -a 38744 /usr1/aix/dlc/bin/_mprosrv | tee dbx.out

At this point repeat the sequence of actions which causes the abnormal termination.
When the termination occurs go to the session where dbx was started.

DBX will typically modify the prompt and will look similar to this:
Waiting to attach to process 38744 ...
Successfully attached to _progres.
Type 'help' for help.
reading symbolic information ...warning: no source compiled with -g

stopped in wait.wait at 0xd034b914 ($t1)
0xd034b914 (wait+0xe8) 80410014        lwz   r2,0x14(r1)
(dbx)

At this point issue the where command:
(dbx) where

The output should appear on the screen and in the file designated by the tee command to the dbx.out file.
There are several ways to exit DBX

1)  To exit DBX with a process termination issue the command:
q

2)  To exit without a process termination issue the command:
detach

NOTE:  If the process was already in the process of termination the detach will not alter that chain of events.

Workaround
Notes
Keyword Phrase
Last Modified Date9/13/2015 2:24 PM

Powered by