Re: Strange Crashes of Late

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 07/12/00


StormeRider wrote:
>
> Been getting a lot of strange crashes of late. Backtraces show like:

<snip>

> (gdb) #0  0x2ab71fd9 in chunk_alloc () from /lib/libc.so.6
> #1  0x2ac0c2c0 in __DTOR_END__ () from /lib/libc.so.6
> Cannot access memory at address 0x10.

Hrmmm, I've actually had to debug something like this before, it's not
easy to do.  Basically what's happening is that your Seg Fault is
trashing the core dump (or something like that), so GDB can't properly
report where the problem is occurring.  The only way I have found to
solve such a problem is to run the MUD inside GDB, set a breakpoint for
the function that you suspect is crashing the MUD, then step through it
until it crashes, this will at least tell you where it is crashing.
Then you run it again, and step through again to the point where it is
about to run the line that crashes it.  Then you can examine all your
data at that point and see if you can figure it out.  Of course, this
all requires that you have at least some idea of what's causing the
crash, so a good place to start would be to try to get to the point
where you can actually make it crash at will, this may require typing
ceartain different commands in different orders.  Consider what changes
you have made to the code recently that may be causing the problems
also.

A couple of tips that you can use to help you to narrow down where the
crash is occurring...

Set a breakpoint for a function which you suspect is causing the crash,
then when it breaks at the function type "finish" to have it run through
the function to completion.  If it crashes before it breaks at the end
of the function then you have found the right function, otherwise, keep
looking.

Sleep on it, always works for me. ;)

Regards, Peter

I'm Back everyone!  *smiles*


     +------------------------------------------------------------+
     | 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/10/01 PDT