[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]  Switched Servers Now Copyover/Hotboot Is Crashing
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Switched Servers Now Copyover/Hotboot Is Crashing

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


Posted by Gatz   (17 posts)  [Biography] bio
Date Wed 06 Jul 2005 01:52 AM (UTC)  quote  ]
Message
I just switched to MUD Magic servers and now my hotboot/copyover for both my SWR and SMAUG codes crash sometimes. Also, they sometimes crash a few times before starting up. I've obviously made clean and made sure the exe's have both been re-made for the server. I contacted the Admins and they said it was an in game issue. The core file drops all point to int main. My startup script for my SMAUG (Which is SMAUG 1.5 FUSS) is stock and my SWR (SWR 1.0, Non-FUSS) script is basicly near stock. Anyways, they said it my be my startup script. I did a test by loading up a SWR 1.1 FUSS and it too crashed on copyover/hotboot. Does anyone know what the problem is? (Note: My Hotboot for SWR is the Dark Warriors version and my SMAUG hotboot is Samson's snippet'ed one)

And just to show you the core file:

warning: core file may not match specified executable file.
Core was generated by `grep :4567 '.
Program terminated with signal 11, Segmentation fault.
#0 0x0012cc52 in ?? ()
(gdb) bt
#0 0x0012cc52 in ?? ()
(gdb) list
126
127 void mail_count args( ( CHAR_DATA *ch ) );
128
129
130
131 int main( int argc, char **argv )
132 {
133 struct timeval now_time;
134 // int port;
135 bool fCopyover = !TRUE;
(gdb)

That is from my SWR code, but the SMAUG one roughly looks the same.

Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Wed 06 Jul 2005 04:59 AM (UTC)  quote  ]
Message
Can you recreate this issue when booted inside of GDB? If you can step through the end of the copyover, you may be able to get clearer idea of whats going on. Do you know if the same thing happens to normal copyover? I would assume so, but my hotboot is based on samson, so there may be something inheirently wrong with it that has not come up before.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Gatz   (17 posts)  [Biography] bio
Date Reply #2 on Wed 06 Jul 2005 05:29 AM (UTC)  quote  ]

Amended on Wed 06 Jul 2005 08:18 AM (UTC) by Gatz

Message
Okay, I noticed that launching the game in GDB and doing copyovers is no problem...I'm not sure what is up. I've done 5 and so far there hasn't been one crash. (I did this with the SMAUG Hotboot, I have yet to test the SWR)

Just an added note, right after I tried to start the MUD normally with nohup ./startup &, it dropped a core that looked like this:
warning: core file may not match specified executable file.
Core was generated by `grep -c LISTEN'.
Program terminated with signal 11, Segmentation fault.
#0 0x0012cc52 in ?? ()
(gdb) bt
#0 0x0012cc52 in ?? ()
(gdb) list
148
149 #ifdef WIN32
150 int mainthread( int argc, char **argv )
151 #else
152 int main( int argc, char **argv )
153 #endif
154 {
155 struct timeval now_time;
156 char hostn[128];
157 bool fCopyOver = !TRUE;
(gdb) quit

I did 'nohup ./startup &' again and it started normally.

Okay, some more info. I attached a GDB to the game while running and did a step and got this:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0012cc50 in _start () from /lib/ld-linux.so.2
(gdb) step
Single stepping until exit from function _start,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x0012cc52 in _start () from /lib/ld-linux.so.2
(gdb) list
148
149 #ifdef WIN32
150 int mainthread( int argc, char **argv )
151 #else
152 int main( int argc, char **argv )
153 #endif
154 {
155 struct timeval now_time;
156 char hostn[128];
157 bool fCopyOver = !TRUE;
(gdb) step
Single stepping until exit from function _start,
which has no line number information.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) step
The program is not being run.


Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Gatz   (17 posts)  [Biography] bio
Date Reply #3 on Wed 06 Jul 2005 11:46 AM (UTC)  quote  ]

Amended on Wed 06 Jul 2005 11:48 AM (UTC) by Gatz

Message
Sorry for a double post, however I found something interesting. I noticed this when I launched my game again (On another port), so as to not disturb players. The same effect happens when starting it in GDB.
These are the ps ux displays:

Normal startup:
gatz 738 0.0 0.1 5348 1192 ? S 03:23 0:00 /bin/csh -f /home/gatz/naruto/src/startup
gatz 781 0.0 0.5 6444 4472 ? S 03:24 0:00 ../src/smaug 4545

GDB startup:
gatz 6474 2.0 0.9 13196 7492 pts/9 S 06:35 0:00 gdb ../src/smaug
gatz 6475 1.8 0.5 6896 4056 pts/9 S 06:35 0:00 /home/gatz/naruto/src/smaug

After Copyover on GDB startup:
gatz 6474 0.1 0.9 13008 7328 pts/9 S 06:35 0:00 gdb ../src/smaug
gatz 6475 0.2 0.4 7288 3700 pts/9 S 06:35 0:00 smaug 4545 hotboot 7 -1

I noticed that launching it on the alt port produced basicly near the same result (Sorry for not having ps ux displays on those). I could just be ignorant and this not tying into my problem at all but it seems when the ps ux display reads like GDB it will copyover fine everytime without a crash.

Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #4 on Wed 06 Jul 2005 12:20 PM (UTC)  quote  ]
Message
Quote:

warning: core file may not match specified executable file.
Core was generated by `grep -c LISTEN'.
Program terminated with signal 11, Segmentation fault.


The above three lines are critical here - your crash is not coming from Smaug or SWR, but from the startup script. It appears as though the grep command is somehow causing a problem when you do a copyover. I have no idea why that would cause issue. It's the first time I've ever seen that reported.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by Gatz   (17 posts)  [Biography] bio
Date Reply #5 on Wed 06 Jul 2005 03:30 PM (UTC)  quote  ]

Amended on Wed 06 Jul 2005 06:26 PM (UTC) by Gatz

Message
Well, using Samson's advice I looked at my startup script and removed this:
# Run SMAUG.
# Check if already running
set matches = `netstat -an | grep ":$port " | grep -c LISTEN`
if ( $matches >= 1 ) then
# Already running
echo Port $port is already in use.
exit 0
endif

Now, my MUD runs fine and copyover/hotboot's fine.

Oh, and I did get a few cores after I removed the other stuff which mentioned 'date'. Remove these lines:
date > $logfile
date > ../area/boot.txt
Got rid of the crashes and now my copyover/hotboot has yet to crash with any error.


[Edit: Boy did I speak too soon. I got it to copyover a few times. I keep getting core files which point me to various things in my startup script.]

[Edit 2: It is totally my startup script like you folks have said, but it has worked on 2 other servers. Spunge and Slayn. However, since popping to MUD Magic it has given me issues.]

Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #6 on Wed 06 Jul 2005 11:11 PM (UTC)  quote  ]

Amended on Wed 06 Jul 2005 11:32 PM (UTC) by Greven

Message
There are several different start up script that may work better on mud magic, but if you have the know how, I would recommend writing your own so that you can make it work the way you need to.

you may also want to check the mud magic forums, as this issue may have come up with smaugs before and someone might already have the fix to it.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[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.


3,901 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]