[GLLUG] Debugging executables that act weird

Edward Glowacki glowack2@msu.edu
21 Feb 2002 13:36:45 -0500


On Tue, 2002-02-19 at 16:55, Adam McDougall wrote:
>   What I'm wondering is if there is any good way (with GDB maybe?) to
>   examine what shared libraries the program is trying to load.  Or
>   frankly, any other suggestions you may have as to how to debug this damn
>   thing would be more than welcome.
> 
> ldd will show what libraries it is linked to, but it may be able to dlopen()
> more I think.  Also, ktrace and truss may help you to figure out what it is
> doing.  truss shows system calls on the output, and ktrace dumps info to a 
> file you use kdump to view.

Thanks, that helped a little bit.  ldd reports it is only linked to
libc.so.3.  md5 checksums of both machines indicate the same library and
binary are in use.  Both machines are using the same kernel.  Truss
shows similar information up to the point of a connect() call.  On that
call, one machine shows some hex info, the other shows what looks like a
data structure of some sort.  However, another machine that works shows
the same kind of hex info at that call as the one that doesn't work, so
I'm not entirely sure that's the cause.  Anyways, the one eventually
fails with a "connection terminated by peer" type message while the
other one works fine.

I would personally like to try to track this down by looking at the
source code and finding out *what* the problem is, but the current
recommendation by the Keeper of the Code is to reinstall my machine from
scratch, starting with a bare minimum, getting this piece of software to
work, then adding things back until something breaks.  "It works on
every other system so it must be your fault," is kinda the attitude I'm
getting.  Anyways, this will probably be as far as I can go with this. 
So like the number of licks it takes to get to the center of a Tootsie
Pop, "The world may never know."  Of course, it's been my personal
crusade for a while now to totally eradicate this code from further use
(a crusade that like this one will likely fail, sadly), so the ultimate
answer may be, "The world may never care." ;)



-- 
Edward Glowacki				glowack2@msu.edu
GLLUG Peon  				http://www.gllug.org
Imagination is the one weapon in the war against reality.
                -- Jules de Gaultier