Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Autoreboot Issues - Areas

Autoreboot Issues - Areas

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Samryn   United Kingdom  (60 posts)  Bio
Date Thu 04 Oct 2007 12:17 AM (UTC)
Message
So, lately the mud will not allow the mud to reboot. This happens when the mud is trying to close the mud down I believe... After doing a wee little search using gdb. But now I'm stumped... clueless etc.


(gdb) bt
#0  0x005fc7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0063d7a5 in raise () from /lib/tls/libc.so.6
#2  0x0063f209 in abort () from /lib/tls/libc.so.6
#3  0x00671a1a in __libc_message () from /lib/tls/libc.so.6
#4  0x006782bf in _int_free () from /lib/tls/libc.so.6
#5  0x0067863a in free () from /lib/tls/libc.so.6
#6  0x080ad16c in close_area (pArea=0x99c8210) at act_wiz.c:5571
#7  0x080ad1cb in close_all_areas () at act_wiz.c:5586
#8  0x080e9fd6 in cleanup_memory () at comm.c:334
#9  0x080ea6cd in main (argc=1, argv=0xbfe33924) at comm.c:578



(gdb) frame 1
#1  0x0063d7a5 in raise () from /lib/tls/libc.so.6
(gdb) frame 2
#2  0x0063f209 in abort () from /lib/tls/libc.so.6
(gdb) frame 3
#3  0x00671a1a in __libc_message () from /lib/tls/libc.so.6
(gdb) frame 4
#4  0x006782bf in _int_free () from /lib/tls/libc.so.6
(gdb) frame 5
#5  0x0067863a in free () from /lib/tls/libc.so.6
(gdb) frame 6
#6  0x080ad16c in close_area (pArea=0x99c8210) at act_wiz.c:5571
5571       DISPOSE( pArea );
(gdb) frame 7
#7  0x080ad1cb in close_all_areas () at act_wiz.c:5586
5586          close_area( area );
(gdb) frame 8
#8  0x080e9fd6 in cleanup_memory () at comm.c:334
334        close_all_areas(  );
#9  0x080ea6cd in main (argc=1, argv=0xbfe33924) at comm.c:578
578        cleanup_memory(  );


Any help would be greatful, thanks.

Samryn Medri
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Thu 04 Oct 2007 12:34 AM (UTC)
Message
It shouldn't prevent the MUD from rebooting. The startup script handles that, so even if it crashes it should boot back up.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Samryn   United Kingdom  (60 posts)  Bio
Date Reply #2 on Thu 04 Oct 2007 12:54 AM (UTC)
Message
The mud has worked for a while, and then suddenly it stopped. Now im wondering it an area being currupted could cause this?

The startup script hasn't been altered anyway, but i'll paste it here and see if you can see anything I cant? Cheers Zeno.


#! /bin/csh -f

# Set the port number.
set port = 6767
if ( "$1" != "" ) set port="$1"

# Change to area directory.
cd ../area

# Set limits.
nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt

while ( 1 )
    # If you want to have logs in a different directory,
    #   change the 'set logfile' line to reflect the directory name.
    set index = 1000
    while ( 1 )
        set logfile = ../log/$index.log
        if ( ! -e $logfile ) break
        @ index++
    end

    # Record starting time
    date > $logfile
    date > ../area/boot.txt

    # Record initial charges
    # charges >> $logfile

    # Run SMAUG.
    ../src/smaug $port >&! $logfile
#    ../src/smaug >>&! $logfile

    # Record ending charges
    # charges >> $logfile

#    # Delete this out if no adb.
#    if ( -e core ) then
#           echo '$c' | adb ../src/smaug
#    endif

    # Restart, giving old connections a chance to die.
    if ( -e shutdown.txt ) then
        rm -f shutdown.txt
        exit 0
    endif
    sleep 15
end

Samryn Medri
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #3 on Thu 04 Oct 2007 01:29 AM (UTC)
Message
When the MUD crashes, what is the status of the startup script? Is it still running? It should be.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Samryn   United Kingdom  (60 posts)  Bio
Date Reply #4 on Thu 04 Oct 2007 02:05 AM (UTC)
Message
Apparantly so... but when I logout of the shell, it seems like the startup script stops. If im still logged into the shell it keeps the startup script working...

Samryn Medri
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Thu 04 Oct 2007 02:11 AM (UTC)
Message
Try running it like this:
nohup ./startup &


As for the crash, I'm not really sure. I don't use cleanup_memory. I think you could safely comment that out..?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Thu 04 Oct 2007 10:29 PM (UTC)
Message
Commenting it out is just hiding from the problem, I'm not sure you want to do that because the crash is symptomatic of a bigger problem.

It appears that something in cleanup is trying to free memory that has already been freed (that is a very common reason for a program to crash upon a 'free' call). It could also be that, somehow, the pointer got corrupted. The best way to find these is to run your program through valgrind, a memory checking tools; these forums have several references to that so I'd recommend a search for it.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,359 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.