nWith most OS’s, gdb can be used to attach to dt then request a user level
stack trace. Although this lets you know dt’s last
system call, this method will not provide
the kernel stack trace which may reveal where dt is really hung.
n
nLinux Example:
n
ulinux# ps -ef | fgrep dt | grep -v
fgrep
uroot 20580 20256 49 10:45 pts/1 00:00:33 /var/tmp/dt of=/var/tmp/dt.data
limit=100m disable=stats runtime=1h
ulinux# gdb dt 20580 <- PID
uGNU gdb Red Hat Linux
(6.3.0.0-1.132.EL4rh)
u …
uAttaching to program:
/u/rtmiller/Tools/dt.d-WIP/linux2.6-x86/dt, process 20580
u(gdb) bt
u#0 0x00ab17a2 in _dl_sysinfo_int80 () from
/lib/ld-linux.so.2
u#1 0x00d343f3 in __write_nocancel () from
/lib/tls/libpthread.so.0
u#2 0x080556c4 in write_record (dip=0x87e8028,
u buffer=0x87eb000 ..., bsize=512,
dsize=512,
u status=0xbfe758dc) at
../dtwrite.c:475
u#3 0x080552c4 in write_data (dip=0x87e8028) at
../dtwrite.c:311
u#4 0x08051410 in write_file (dip=0x87e8028) at
../dtgen.c:853
u#5 0x0804ad1a in main (argc=5, argv=0xbfe75a34)
at ../dt.c:2006
u(gdb) quit
uThe program is running. Quit anyway (and detach it)? (y or n) y
uDetaching from program:
/u/rtmiller/Tools/dt.d-WIP/linux2.6-x86/dt, process 20580
ulinux#
u