[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Autoreboot Issues - Areas

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Autoreboot Issues - Areas
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Thu 04 Oct 2007 10:29 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Thu 04 Oct 2007 02:11 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Thu 04 Oct 2007 02:05 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Thu 04 Oct 2007 01:29 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Thu 04 Oct 2007 12:54 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Thu 04 Oct 2007 12:34 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Thu 04 Oct 2007 12:17 AM (UTC)  quote  ]
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
[Go to top] 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.


1,595 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]