[torquedev] Issues debugging fork statements in MOM using GNU debugger

Garrick Staples garrick at usc.edu
Wed Mar 1 16:05:32 MST 2006


On Wed, Mar 01, 2006 at 05:52:51PM -0500, Prakash Velayutham alleged:
> Garrick Staples wrote:
> >On Wed, Mar 01, 2006 at 09:40:30AM -0500, Prakash Velayutham alleged:
> >  
> >>Hi,
> >>
> >>I do not know if this is the right list, but hopefully someone here can 
> >>help me. I am trying to understand the working of Torque system and so 
> >>going through the source code. I have been pretty successful with GDB in 
> >>cases of forking (where I want to follow the child), but for some reason 
> >>it does not seem to work at the MOM end. Especially inside the 
> >>TMomFinalizeJob2 routine, none of my tricks to get to follow the child 
> >>process is successful. Could anyone here lead me in the right direction 
> >>to achieve this?
> >>    
> >
> >I don't know how to do it directly either.  I do most of that printf
> >and logging.  You can also use abort() at strategic locations and
> >inspect the core file.  And valgrind can conviently run gdb on the child
> >processes for you.
> Is it possible to debug the MOM code interactively (meaning real-time 
> debugging) using valgrind running gdb? Could you give me an example of 
> that usage? Just a newbie with valgrind...

Just run valgrind with --db-attach=yes and it will run gdb when it finds
a warning or error.

-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20060301/7097b0c6/attachment.bin


More information about the torquedev mailing list