Consultor Eletrônico



Kbase 13024: How to use dbx to obtain trace stack (if no core is dumped)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to use dbx to obtain trace stack (if no core is dumped)


INTRODUCTION:
=============

Ihis Product Services Technical Support Knowledgebase entry explains
how to produce an ascii file, when there is not core file dumped, or
adb/sdb fails. This entry should be used after "How to use adb or sdb
to dump core file for PSC Tech Support" (Entry 3167).

When Progress generates the following error messages:
* SYSTEM ERROR: Bus error. (48)
* SYSTEM ERROR: Memory violation. (49)
it means that the unix kernel intercepted a system error, and is
unable to continue.

If a core file is produced, use Entry 3167 to obtain a stack trace.
In some cases, the core file can't be analyzed by adb/sdb, or no core
file is actually produced. In these cases, we can use other tools
to get this information. Most common is a tool called dbx, which
exist on many unix platforms including IBM6000, DG & SUN.

Important commands for the dbx tool:
Command Meaning
------- -----------------------------------------------
cont Continue execution
where Gives a stack trace, i.e. all internal function
called to this point in the program
quit Quit dbx tool

We will use the "tee" utility to store the display information in a
file, called "trace.txt". We will now give examples how to use this
tool on the above 3 mentioned platforms:

IBM6000:
Start a process with "&" to see the pid display'ed or get the pid
from the kernel with the "ps -aef" utility.
Example: $DLC/bin/_mpromtf -ws &
Gives : 12345
back as the pid. To run the dbx tool on IBM/6000 type:
dbx -a 12345 | tee trace.txt
i.e. use the -a option to attach to a process thru pid, and echo
output to the trace.txt file. Continue the process by:
cont
This should give focus back to the process. When the error occurs,
the program will return back to the dbx tool. Then type:
where
which will give you the stack trace. Quit the program by:
quit
and print out the "trace.txt" file, which should be fax'ed to Progress
Software Technical Support.


For the DG & SUN platforms, the commands are a little bit different:
Startup: dbx | tee trace.txt
Attach: debug <module> <pid>
Process: cont
Trace: where
Stop: quit

Example: Progress executable (/usr/dlc/bin/_promtf) was started with
pid 1234 running in a Motif environment on a DG machine. Type:
dbx | tee trace.txt
debug /usr/dlc/bin/_promtf 1234
cont
Once the error occurs, the process will return back to dbx. Type:
where
cont
until the process is completed. Use quit to stop.
On a Sun platform, you have to type "Ctrl-C" to get back into the dbx
tool, but otherwise it works similar.

Again, in case of problems, please refer to dbx documentation on
your own system.

Progress Software Technical Support Note # 13024