[CODE] Freeze error, GDB and .c output, please help.:)

From: Eduardo Gutierrez de Oliveira (eduo@sparc.ciateq.conacyt.mx)
Date: 01/24/97


Hiya, a little exercise of desk checking..:)

I was yesterday putting some stuff in a copy of my code and kept on adding
since the thing compiled perfectly, today I left it for a while and found
out it is not as stable as you'd think..:)

First of all, I added quite some stuff, particularly new users equipment
and pieces salvaging from corpses this last days.

I seem to be having several errors, or it could all be part of the same.

First of all, if I leave the mud running for a while without users it'll
go to sleep and can be like that for hours, without problem. 

As soon as a user logs in I get a gethostbyaddr error (no such file or
directory), which I cannot even begin to deduct what could it be pointing
to. Only outer users give this error.

When any immortal enters the mud he or she appears in the limbo, but no
error appears, and if anyone accesses the immort_start_room the whole
thing freezes.

Now, I have seen that the mud freezes whenever someone tries to teleport
(o enter or any kind of movement) into the immort_start_room (I have tried
changing it and only that one gives errors). It also stays frozen, doesn't
crash untils a lapse of time occurs, again, no error message.

If I teleport wandering mobs to room 1201 (where the only exit points to
1201, immort_start_room) they go out of the room every 20th tic or
something (that is, they tend to stay put, actually only one fido has
ventured there) and when they do they reappear in the same room as if they
had entered a circular room, like this:

500(500)hitp 100(100)mana 82(82)move>
The beastly fido leaves north.
The beastly fido has arrived.
(this is the same mob)

force keeper s
Okay.
The Peacekeeper leaves south.
The Peacekeeper has arrived.
The Peacekeeper leaves up.

This peacekeeper went up in a room that had no up exit... 1204 *does* have
an up exit.

If i do go into that room the whole thing freezes:

his essence is stored in the stones.  The Immortal Board Room is to
the south.
[ Exits: s ]
A beastly fido is mucking through the garbage looking for food here.
The Immortal Innkeeper is organizing her books here.

500hp 100mp 82mv> s
...
NOthing happens...

It coredumps after a while and starts eating CPU cycles like crazy:

19994 mud       95    0 4080K 3736K run     2:04 91.46% 91.46% circle

GDB gives me this when backtracing the stack (the BT is identical no
matter if I let the thing coredump by itself or if I interrupt the thing):

Fri Jan 24 16:36:27 :: SYSERR: CHECKPOINT shutdown: tics not updated

Program received signal 6, Abort trap
0x7ccb1 in kill (0x00004295, 0xefbfd64c, 0xefbfdfde, 0x0000001a)
(gdb) bt
#0  0x7ccb1 in kill (0x00004295, 0xefbfd64c, 0xefbfdfde, 0x0000001a)
#1  0x7c1d7 in abort (0x00004295, 0xefbfd64c, 0xefbfdfde, 0x0000001a)
#2  0x42df in checkpointing () at comm.c:1703
#3  0xefbfdfde in grn (0x0000d597, 0x00000001, 0x003c5a00, 0x00000000)
#4  0xdbf3 in do_simple_move (ch=0x1, dir=2, need_specials_check=3955200)
    at act.movement.c:224
#5  0xddd3 in perform_move (ch=0x3c5a00, dir=2, need_specials_check=0)
    at act.movement.c:272
#6  0xde62 in do_move (ch=0x3c5a00, argument=0xefbfd755 "", cmd=3,
subcmd=3)
    at act.movement.c:299
#7  0x3b14c in command_interpreter (ch=0x3c5a00, argument=0xefbfd754 "s")
    at interpreter.c:568
#8  0x2089 in game_loop (mother_desc=6) at comm.c:607
#9  0x1602 in init_game (port=6) at comm.c:244
#10 0x1504 in main (argc=3, argv=0xefbfdb54) at comm.c:214

 So it gives me an error in checkpoint and in init_game:

comm.c:
RETSIGTYPE checkpointing()
{ if (!tics) { log("SYSERR: CHECKPOINT shutdown: tics not updated");
abort(); } else tics = 0;}

act.movement.c (suspiciously close to the mount mods):

  if (!IS_AFFECTED(ch, AFF_SNEAK)) {
    if (riding && same_room && !IS_AFFECTED(RIDING(ch), AFF_SNEAK)) {
      sprintf(buf2, "$n arrives from %s%s, riding $N.",
              (dir < UP  ? "the " : ""),
              (dir == UP ? "below": dir == DOWN ? "above" :
dirs[rev_dir[dir]]));
      act(buf2, TRUE, ch, 0, RIDING(ch), TO_ROOM);
    } else if (ridden_by && same_room && !IS_AFFECTED(RIDDEN_BY(ch),
AFF_SNEAK)) {
      sprintf(buf2, "$n arrives from %s%s, ridden by $N.",
              (dir < UP  ? "the " : ""),
              (dir == UP ? "below": dir == DOWN ? "above" :
dirs[rev_dir[dir]]));
      act(buf2, TRUE, ch, 0, RIDING(ch), TO_ROOM);
    } else if (ridden_by && same_room && !IS_AFFECTED(RIDDEN_BY(ch),
AFF_SNEAK)) {
      sprintf(buf2, "$n arrives from %s%s, ridden by $N.",
              (dir < UP  ? "the " : ""),
              (dir == UP ? "below": dir == DOWN ? "above" :
dirs[rev_dir[dir]]));
      act(buf2, TRUE, ch, 0, RIDDEN_BY(ch), TO_ROOM);
    } else if (!riding || (riding && !same_room))
      act("$n has arrived.", TRUE, ch, 0, 0, TO_ROOM);
   /*   ^^^^^^^^^^^^^^
      Line 1024 */
  }   
  if (ch->desc != NULL)
    look_at_room(ch, 0);

I don't know what else to post, I am not sure if I should post further
examples of the thing (you tell me which), I need a direction here, since
I am just doing my first attempts at using gdb...

Thanks in advance for help

Eduo
---------------------------------------------------------------------------
Eduardo Gutierrez de Oliveira                  eduo@sparc.ciateq.conacyt.mx
Administrador de Internet                            Internet Administrator
Proveedor de Servicio Internet                    Internet Service Provider
                          CIATEQ, A.C. --  MEXICO
 Centro de Investigacion y Asistencia Tecnica del Estado de Queretaro, A.C.
                     http://sparc.ciateq.conacyt.mx/
---------------------------------------------------------------------------

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST