Current Position:Home > [help]a problem about dbx/attach a tuxedo service

[help]a problem about dbx/attach a tuxedo service

Update:11-30Source: network consolidation
Advertisement
I attempted to trace a Tuxedo service process via dbx/attach command:
attach nnnnwhen I attached dbx to the service PID, the service process is stopped somewhere outside my service program:
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: [email protected]
=>[1] __systemcall(0xffbfeda8, 0x31, 0x2, 0x10540c, 0x2cc0e8, 0x641dc), at 0xfe120080
  [2] _libc_msgrcv(0x10540c, 0x2cc0e8, 0x641dc, 0xc0000000, 0x0, 0x2ec), at 0xfe117928
  [3] msgrcv(0x10540c, 0x2cc0e8, 0x641dc, 0xc0000000, 0x0, 0x0), at 0xfe45dc40
  [4] _tmmbrecvm(0x0, 0xbdb0c, 0x2, 0xa, 0x0, 0x7), at 0xfe59b658
  [5] _tmmsgrcv(0xfffffffc, 0xfe5fdaa8, 0x0, 0xffff, 0xbf800, 0xb76c8), at 0xfe4bc1d0
  [6] _tmrcvrq(0xae608, 0xffbff38c, 0x22, 0x10000000, 0x1000, 0xc0000000), at 0xfe4f9738
  [7] _tmrunserver(0x0, 0x1400, 0x0, 0xfe5fdaa8, 0x0, 0xb76c8), at 0xfe4fe418
  [8] _tmstartserver(0x15, 0x1c00, 0x8b160, 0xae608, 0x0, 0x8af88), at 0xfe4d7530
  [9] main(0x15, 0xffbff4bc, 0xffbff514, 0x8b000, 0x0, 0x0), at 0x238f8However, I can not resume the service process either. when I use cont command, the dbx seems to stop there with no input prompt.
Has anyone debug a tuxedo serive in SunOS using dbx?How can I resume the server process If I want to print the local variables?Thank you in advance!
Edited by: angeloyu on Sep 16, 2008 8:02 PM

The Best Answer

Advertisement
angeloyu wrote:
I attempted to trace a Tuxedo service process via dbx/attach command:
attach nnnnwhen I attached dbx to the service PID, the service process is stopped somewhere outside my service program:
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: [email protected]
[9] main(0x15, 0xffbff4bc, 0xffbff514, 0x8b000, 0x0, 0x0), at 0x238f8
Judging by WS6U2 above, I assume you are using dbx 6.2, which is very, very old. Unless you need it to work on similarly old Solaris, please consider upgrading to Sun Studio 11 (supports Solaris 8) or Sun Studio 12 (supports Solaris 9+). Both are free and contain many improvements.
angeloyu wrote:
However, I can not resume the service process either. when I use cont command, the dbx seems to stop there with no input prompt.That's kind of expected behavior from the debugger - it resumes debuggee and sits there until debuggee generates some event (like hitting breakpoint or receiving a signal). Once dbx gets notified of this event, it presents details to the user and provides input prompt.
Did you put any breakpoints in (with stop command)? You'll also need to make sure breakpoint is reached by that service you are debugging.
Anyways, if all you need is to trace the service, it might be easier to use truss(1) command like this:
$ truss -p `pgrep Tuxedo`