Hi,

I did some grepping around the Trafodion code and came up with this list of 
hook files. (There are a lot of others but they seem to be associated with test 
programs.)

Does this look right?

Dave

./core/sqf/src/seabed/src/fs.cpp:    msg_debug_hook(pp_who, pp_fname);
./core/sqf/src/stfs/common/stfs_util.cpp:    msg_debug_hook("STFS", 
"stfs.hook");
./core/sqf/src/tm/tm.cpp:    msg_debug_hook ("tm.hook", "tm.hook");
./core/sqf/src/tm/idtmsrv.cpp:        msg_debug_hook("s", "s");
./core/sql/common/memtest.cpp:    msg_debug_hook("memtest", "memtest.hook");
./core/sql/qms/QmpMain.cpp:    msg_debug_hook("tdm_arkqmp", "tdm_arkqmp.hook");
./core/sql/qms/QmmMain.cpp:    msg_debug_hook("tdm_arkqmm", "tdm_arkqmm.hook");
./core/sql/qms/QmsMain.cpp:    msg_debug_hook("tdm_arkqms", "tdm_arkqms.hook");
./core/sql/bin/ex_esp_main.cpp:  msg_debug_hook("arkesp", "esp.hook");
./core/sql/bin/SqlciMain.cpp:    msg_debug_hook("sqlci", "sqlci.hook");
./core/sql/bin/ex_sscp_main.cpp:  msg_debug_hook("mxsscp", "mxsscp.hook");
./core/sql/bin/arkcmp.cpp:    msg_debug_hook("arkcmp", "ark.hook");
./core/sql/bin/ex_ssmp_main.cpp:  msg_debug_hook("mxssmp", "mxssmp.hook");
./core/sql/bin/mpisetup.cpp:    msg_debug_hook("NGG", "ngg.hook");


-----Original Message-----
From: Dave Birdsall [mailto:[email protected]] 
Sent: Wednesday, January 25, 2017 9:38 AM
To: [email protected]
Subject: Using hook to debug Trafodion processes

Hi,

I need to debug an issue in tdm_arkcmp that may occur very early in its 
processing.

I remember we had a technique called "hook" which caused any SeaQuest process 
to wait until a particular file exists. The way it works was, you'd set 
HOOK_ENABLE=1 in your $TRAF_HOME/etc/ms.env file and restart your instance.

Then, every process instrumented with a msg_debug_hook call in it would block 
until the file named in the call existed. So, for example, the main for 
tdm_arkcmp.cpp (in core/sql/bin/arkcmp.cpp) has msg_debug_hook("arkcmp", 
"ark.hook"); so tdm_arkcmp will block until the file ark.hook exists.

I remember that in earlier versions of the code a collection of *.hook files 
were present in the source distribution. These seem to be gone now; I cannot 
find them.

I tried this yesterday, and sqstart doesn't complete. The probable reason is 
one or more of the processes that fire up at sqstart time has a msg_debug_hook 
call.

Now the question:

Does anyone know off the top of their head the complete set of *.hook calls? 
Also, what directory does msg_debug_hook look into to find these files?

I'll update the Trafodion wiki with this information once I have the complete 
story.

Thanks,

Dave

Reply via email to