CODE: Mud crashing (long)

From: Juliano Ravasi Ferraz (jferraz@linkway.com.br)
Date: 03/08/00


Hello Everyone.

I need some help with debuging. I run a MUD based on Circle 3.0 bpl11.
When I changed the number of levels to 110 (100 mortal + 10 imms), I
needed to change the level and bhd for some mobs. Now, I have my mud
crashing sometimes when these mobs are killed.

Using gdb, i got the following:

GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
 <snip>
#0  0x50555247 in ?? ()
(gdb)

Interesting, this hex address (50555247) represents the letters "PURG",
that is found 2 times on the core dump, both on the help files. I thing
that some buffer overrun was ocurred and overwriten the EIP. Looking at
static bufs:

(gdb) p buf+8000
$1 = 0x80cdb60 ""
(gdb) p buf1+8000
$2 = 0x80c9860 ""
(gdb) p buf2+8000
$3 = 0x80cb860 ""
(gdb) p arg+8000
$4 = 0x80c7840 ""

No overflows... Looking at the content of them, some interesting thing:

(gdb) p (char *) buf2
$5 = 0x80c9920 "the corpse of the Ki-Rin"

The stack is:

(gdb) bt
#0  0x50555247 in ?? ()
#1  0x804a368 in heartbeat (pulse=114240) at comm.c:719
#2  0x804a279 in game_loop (mother_desc=3) at comm.c:690
#3  0x80496fa in init_game (port=4000) at comm.c:269
#4  0x804961e in main (argc=3, argv=0x7ffffd34) at comm.c:222
#5  0x2ab05cb3 in __libc_start_main (main=0x8049400 <main>, argc=3,
    argv=0x7ffffd34, init=0x8048e70 <_init>, fini=0x808e2fc <_fini>,
    rtld_fini=0x2aab5350 <_dl_fini>, stack_end=0x7ffffd2c)
    at ../sysdeps/generic/libc-start.c:78
(gdb) fr 1
#1  0x804a368 in heartbeat (pulse=114240) at comm.c:719
719         perform_violence();

I think that is something inside perform_violence() that overflow and
the SO wasn't be able to return to correct address, but I have
absolutely no idea on how to find it. Someone can help me?

Thanks.

PS: Excuse-me for my broken english, my first language is portuguese.

--
,--[ Juliano Ravasi Ferraz, F.R+C ]--------------------.
|   `-[ jferraz@linkway.com.br ]----------------------.|
|                                                      |
| Rayon Eletônica e Informática Ltda - Diretor Técnico |
|    Linkway Internet Provider - Unidade Descalvado    |
`------------------------------------------------------'
PGP public key 0x6DD4F051 at http://keys.pgpi.net:11371


     +------------------------------------------------------------+
     | 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