Re: core file creation problem, and ObCircle

From: Mark A. Heilpern (heilpern@mindspring.com)
Date: 02/23/99


Here are the details... I removed most of the comments from the autorun
script. This
script is mostly stock, but when the mud terminates, an automated gdb
session tries
to gather data from the core file (which doesn't exist anymore :) The
script has worked
on another machine with the same version of bash.

[mud@darkstar mud]$ cat tmp_autorun
#!/bin/sh
PORT=4000
FLAGS='-q'

#############################################################################

ps -x | grep "autorun.omega" | grep -v grep | awk '{print $1}' >pid.omega

while ( : ) do

  DATE=`date`
  echo "autorun starting game $DATE" >> syslog
  echo "running bin/circle $FLAGS $PORT" >> syslog

  bin/circle $FLAGS $PORT >> syslog 2>&1

  tail -30 syslog > syslog.CRASH
  gdb -q -x core_decode bin/circle lib/core >> syslog.CRASH 2>&1 </dev/null

# fgrep's and log renaming removed for this posting

  if [ -r .killscript ]; then
    DATE=`date`;
    echo "autoscript killed $DATE"  >> syslog
    rm .killscript
    exit
  fi

  if [ ! -r .fastboot ]; then
    sleep 10
  else
    rm .fastboot
    sleep 2
  fi

  while [ -r pause ]; do
    sleep 60
  done

done



[mud@darkstar mud]$ cat core_decode
bt 5
printf
"\n-------------------------------------------------------------------\n"
printf "Last command was: %s\n", last_command
printf "Executed by %s in room #%d\n", last_commander->player.name,
_glob->world[last_commander->in_room].number
quit



[mud@darkstar mud]$ ls -l /bin/sh
lrwxrwxrwx   1 root     root            4 Oct 12 19:01 /bin/sh -> bash


The core limit size is 1 meg, which is certainly too small.
What's odd though is the 7 meg core file I had last time I
was able to create a core, and the ulimit should have been
the same then.


[mud@darkstar mud]$ ulimit -a
core file size (blocks)  1000000
data seg size (kbytes)   unlimited
file size (blocks)       unlimited
max memory size (kbytes) unlimited
stack size (kbytes)      8192
cpu time (seconds)       unlimited
max user processes       256
pipe size (512 bytes)    8
open files               256
virtual memory (kbytes)  2105343



Thanks for your thoughts on this....


At 07:36 AM 2/23/99 -0800, you wrote:
>"Mark A. Heilpern" wrote:
>>
>> Hi there...
>> On my current host, linux kernel 2.0.35 and
>> GNU bash, version 1.14.7(1), my mud creates a core file just
>> fine if I start the mud from the shell, but if my autorun script
>> starts the mud, no core file is produced when the mud crashes.
>> Any idea why this might be, or what to check for?
>>
>can you post your autorun script? is it stock circle?
>also, are you using bash for your shell to? or is it tcsh?
>also, can you post a copy of your ulimit -a output if you are using bash
>and your limit output if you are using csh/tcsh??
>
>these will help tracking down the problem


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST