Re: mud won't run using gdb...but runs w/o gdb

From: Patrick Dughi (dughi@imaxx.net)
Date: 09/14/00


> I noticed the other day when i tried to mail one of my builders
> that the mud seemed to crash when i sent the mail.  I say seemed
> to crash because i got no core, and could find no record of anything
> amiss in the log.  Being curious i decided to run gdb on it and
> see what it would say when i tried to use mail.  Well the funny
> thing is that it wouldn't even finish booting up the mud and i the
> relevant parts of what i saw are listed below.  The ironic part
> is that when i run it using autorun i never see anything about
> deleting timed out crash  or rent files...i'm clueless and would
> appreciate help.  here's the info:

> Again the real kicker is that though  i'm no closer to figuring out
> what is happening with my mail system the mud runs fine, unless i try
> to use gdb on it.
>

        Well, first, you want to check the permissions, limit, directory
quota's etc regarding the lack of core.  9 time out of 10, core files
aren't generated due to the shell limits.

        If something crashes though, when you're running gdb on it, you
have a number of potential scenarios, none of them good.

        1.  You're using an old version of gcc (pre-glibc?).
Alternatively, you're using an old/incompatiable verison of gdb.  If
you've never recompiled & updated both utilities and all those that depend
on their creation, now is the time to do so.  At least you'll be uptodate.

        2.  If you're somewhere, overwriting the memory stack (writing to
a freed pointer, etc), and your mud doesn't crash immediately, you may
sometimes see this behavior.  You should still get core dumps in this
case, but they will usually be scattered and invalidated, especially the
top function trace level.  You should look at everything you've added in
the last couple of weeks, especially if it does string manipulation with
your own functions, uses CREATE, *alloc, or free, modifies any dynamic
array (like *world), or traverses pointers/etc not included with standard
circle.

        That _is_ nearly everything, but hey, that's the potential scope.

        I believe we saw this once, on a system where parts of the
compiler were using optimizations for a PII(?) architechure, and we were
not running on one.  I can't remember though.. could have been something
AMD based?

        In anycase, upgrade all your software, and examine all your code.

                                                PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT