How to Debug Tuxedo Server
printf( Input data is: %s, inputstr); fprintf(stdout, Input data is %s, inputstr); fprintf(stderr, Input data is %s, inputstr); printf( Return data is: %s, outputstr); tpreturn(tpsuccess, outputstr,..) Console stdout stderr
Tuxedo Buffer userlog (char *,...) #include <userlog.h> printf() ULOG Fprint()/Fprint32() FML/FML32 ID (FLDID(167772170)) 570 (FLDID(167773761)) FILESIZE 9660 BLOCKNUM 1 BLOCKSIZ 100 FILENAME fjdsaskf stdout Fprintf()/Fprintf32()
Tuxedo ud/ud32/wud/wud32 < {Input Data File} ud32 < getclientip.txt FML FML getclientip.txt SRVCNM TA_CLASS TA_OPERATION.TMIB T_CLIENT GET RTN pkt(4) is : TA_ERROR 0 TA_MORE 0 TA_OCCURS 1 TA_CURCONV 0 TA_CURREQ 1 TA_CURTIME 1053430806
Tuxedo Jolt Repository Editor
Tuxedo TMTRACE TMTRACE=(atmi+xa+iatmi *):ulog:dye chtr on/off tmadmin 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:xa: { xa_start(0x200137dc, 0, 0x0) 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:xa: } xa_start = 0 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:at: { tpservice({"jfk_cardused", 0x10, 0x200ee560, 1060, 0, -1, {0, -2, -1}}) 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:at: { tpreturn(2, 0, 0x200ee560, 0, 0x0) 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:xa: { xa_end(0x200137dc, 0, 0x4000000) 061829.xxx!jfkserver.107216: gtrid x0 x3c877b5c x5:trace:xa: } xa_end = 0 061829.xxx!jfkserver.107216: TRACE:at: } tpreturn [long jump] 061829.xxx!jfkserver.107216: TRACE:at: } tpservice 061829.xxx!TMS_ORACLE.118254: gtrid x0 x3c877b5c x4:trace:xa: { xa_prepare(0x20008f3c, 0, 0x0)
ULOG ULOG / / 174011.xxx!TMS_ORA.5437.1.0: LIBTUX_CAT:262: INFO: Standard main starting http://e-docs.bea.com TUXEDO Message 1398 WARN: tpforward called outside service routine Description Action See Also tpforward() was called in an invalid context. Modify the application code calling tpforward(). tpforward(3c)
UNIX -g buildserver f -g f simpserv.c o simpserv s TOUPPER CC CFLAGS Windows /Zi /Od buildserver f /Zi /Od f simpserv.c o simpserv s TOUPPER CL
Tuxedo main -k Tuxedo main() buildserver k f -g f simpserv.c o simpserv s TOUPPER int #ifdef _TMPROTOTYPES main(int argc, char **argv) #else #endif { #ifdef TMMAINEXIT #include "mainexit.h" #endif return( _tmstartserver( argc, argv, _tmgetsvrargs())); }
Debug Tuxedo tmboot -d1 Server $ tmboot -d1 -s simpserv INFO: BEA Tuxedo, Version 8.0, 32-bit, Patch Level 153 INFO: Serial #: 650522264137-933467316566, Expiration 2003-07-31, Maxusers 10000 INFO: Licensed to: BEA Internal use only Booting server processes... exec simpserv -C dom=simpapp -g 1 -i 1 -u bea-cs -U /home/gpdai/tux/ulog -m 0 -A : process id=19897... Started. 1 process started. PS
gdb/dbx/vc++ HP-UX gdb simpserv <pid> Windows msdev p <pid>
SERVICE (gdb) break TOUPPER Breakpoint 1 at 0x2b90: file simpserv.c, line 56.
- -Win simpcl just_a_test
- -Unix
-tmadmin tmadmin pq psr/psc pt pclt
-tmadmin(pic)
-truss truss f p <pi> 1319: msgrcv(7327, 0x0010A788, 1556, -1073741824, 0) (sleeping...) 1319: msgrcv(7327, 0x0010A788, 1556, -1073741824, 0) = 532 1319: pathconf(".", _PC_PATH_MAX) = 1024 1319: stat64("./", 0xEFFF81A0) = 0 1319: stat64("/export/home/appuser/bin", 0xEFFF8108) = 0 1319: getuid() = 1003 [1003] 1319: door_info(4, 0xEFFF5218) = 0 1319: door_call(4, 0xEFFF5200) = 0 1319: sigaction(sigint, 0xEFFF7CB8, 0xEFFF7D38) = 0 1319: getrlimit(rlimit_nofile, 0xEFFF7D78) = 0 1319: times(0xefff72d0) = 91640398 1319: times(0xefff6a30) = 91640398 1319: pipe() = 8 [9] 1319: pipe() = 10 [11] 1319: fork1() = 2609 2609: fork1() (returning as child...) = 1319 2609: close(10) Err#9 EBADF 2609: getuid() = 1003 [1003] 2609: setsid() = 2609 2609: execve("/export/home/oracle/orahome1/bin/oracle", 0x000C6948, 0xEFFFFAA8) Err#2 ENOENT 2609: write(11, " N T P 2 0\n", 7) = 7 1319: read(10, " N T P 2 0\n", 64) = 7 2609: _exit(0)
Core Dump?! ULOG 174011.xxx!BBL.4098.1.0: LIBTUX_CAT:541: WARN: Server GROUP_XX/30001 terminated core strings/gdb/dbx
Core Dump? CORE DUMP dbx/gdb CORE dbx core dbx>where $ gdb odclient core Detected 64-bit executable. Invoking /opt/langtools/bin/gdb64. HP gdb 2.1 Copyright 1986-1999 Free Software Foundation, Inc.
Core Dump! (no debugging symbols found)...#0 0xc000000000c66118 in memmove () from /usr/lib/pa20_64/libc.2 (gdb) where #0 0xc000000000c66118 in memmove () from /usr/lib/pa20_64/libc.2 #1 0x4000000000002bd0 in BILLINFO () #2 0xc00000000007eeb4 in _tmsvcdsp () from /home/tuxedo/lib/libtux.sl #3 0xc000000000096c84 in _tmrunserver () from /home/tuxedo/lib/libtux.sl #4 0xc00000000007e3b8 in _tmstartserver () from /home/tuxedo/lib/libtux.sl #5 0x40000000000021e8 in main () (gdb)
? Restart S1 GRACE=3600 RESTART=Y MAXGEN=10 174011.xxx!BBL.4098.1.0: LIBTUX_CAT:557: INFO: Server GROUP_XX/30001 being restarted
Q&A