[torquedev] Issues debugging fork statements in MOM using GNU
velayups at email.uc.edu
Wed Mar 1 16:15:42 MST 2006
Garrick Staples wrote:
> 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:
>>>> 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.
OK, my bad. I wanted to say trace the code (line by line tracing)
instead of just debug. Is that possible with valgrind? This is where gdb
used to work fine, but it just miserably fails in the MOM's fork_me()
routine for some reason.
More information about the torquedev