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 ➜ Running the server ➜ Save and Quit Problems.

Save and Quit Problems.

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


Posted by Toy   (206 posts)  Bio
Date Thu 01 Aug 2002 02:26 PM (UTC)
Message
I just transfered my MUD from a WIN98 run system over to a LINUX run system. The compile worked, and the mud was up and running. But now, whenever anyone logs into it and "saves and quits" the mud, it crashes. Does anyone have some feedback that might be able to help me fix this problem?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 02 Aug 2002 05:41 AM (UTC)
Message
Maybe a missing directory. I think some of the fopens in the code don't check for a good status. eg. god directory, backup directory. Check all required directories are there.

Also check you have write permissions on all of them.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #2 on Sat 03 Aug 2002 04:00 PM (UTC)
Message
Ok. We've worked with the Write Permissions and and we've got it down to this: players can log on and off without crashing the mud, but when an Immortal saves and quits, it loses the segment core. Any more ideas?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 03 Aug 2002 09:39 PM (UTC)

Amended on Fri 09 Aug 2002 02:22 AM (UTC) by Nick Gammon

Message
There is a directory where it puts immortal stuff (gods or something) check that is there. Look in the source, mud.h I think lists the names of directories used.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 04 Aug 2002 02:16 AM (UTC)
Message
Here are the relevant directory names from mud.h:


#define PLAYER_DIR  "../player/"    /* Player files         */
#define BACKUP_DIR  "../player/backup/" /* Backup Player files  */
#define GOD_DIR     "../gods/"  /* God Info Dir         */
#define BOARD_DIR   "../boards/"    /* Board data dir       */
#define CLAN_DIR    "../clans/" /* Clan data dir        */
#define COUNCIL_DIR     "../councils/"  /* Council data dir     */
#define DEITY_DIR   "../deity/" /* Deity data dir       */
#define BUILD_DIR       "../building/"  /* Online building save dir     */
#define SYSTEM_DIR  "../system/"    /* Main system files        */
#define PROG_DIR    "mudprogs/" /* MUDProg files        */
#define CORPSE_DIR  "../corpses/"   /* Corpses          */
#ifdef WIN32
  #define NULL_FILE "nul"       /* To reserve one stream        */
#else
  #define NULL_FILE "/dev/null" /* To reserve one stream        */
#endif

#define CLASS_DIR   "../classes/"   /* Classes          */
#define WATCH_DIR   "../watch/" /* Imm watch files --Gorog      */
/*
 * The watch directory contains a maximum of one file for each immortal
 * that contains output from "player watches". The name of each file
 * in this directory is the name of the immortal who requested the watch
 */


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #5 on Sun 04 Aug 2002 10:51 PM (UTC)
Message
OK. We've set everything looking in the right directory and files. We've got all the permissions set, but still we're having the problem with Immortals saving and quiting. All other immortal commands work, so maybe there's a problem with the quit command?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #6 on Mon 05 Aug 2002 06:44 AM (UTC)
Message
Better use gdb and work out why it is crashing. I presume you have the core dump, so type:

gdb ../src/smaug coredump

(Or whatever the core file name is)

Then type "bt" to do a backtrace and see what function it is in and why it is there.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #7 on Wed 07 Aug 2002 02:20 AM (UTC)
Message
OK. I've run the debug, and it directs me into Comm.c. This is what the debugger reads:

#0 0x400c1c8c in chunk_alloc (ar_ptr=0x4016d6a0, nb=368) at malloc.c:2877
#1 0x400c1ae4 in __libc_malloc (bytes=364) at malloc.c:2810
#2 0x400b47f4 in _IO_new_fopen (filename=0x4001dc08 "/etc/hosts", mode=0x4001dc06 "r")
at iofopen.c:50
#3 0x40018ec8 in internal_setent (stayopen=0) at nss_files/files-XXX.c:77
#4 0x40019f8a in _nss_files_gethostbyaddr_r (addr=0xbfffe370, len=4, af=2, result=0x40172ce8,
buffer=0x84498a8 "", buflen=1024, errnop=0x40170ac0, herrnop=0xbfffd338)
at nss_files/files-hosts.c:277
#5 0x4013532b in __gethostbyaddr_r (addr=0xbfffe370, len=4, type=2, resbuf=0x40172ce8,
buffer=0x84498a8 "", buflen=1024, result=0xbfffd334, h_errnop=0xbfffd338)
at ../nss/getXXbyYY_r.c:200
#6 0x401350af in gethostbyaddr (addr=0xbfffe370, len=4, type=2) at ../nss/getXXbyYY.c:145
#7 0x0809dcda in new_descriptor (new_desc=6) at comm.c:940
#8 0x0809d598 in accept_new (ctrl=6) at comm.c:616
#9 0x0809d5de in game_loop () at comm.c:640
#10 0x0809d03c in main (argc=2, argv=0xbffff914) at comm.c:316
#11 0x4006b17d in __libc_start_main (main=0x809ccf0 <main>, argc=2, ubp_av=0xbffff914,
init=0x8048fb0 <_init>, fini=0x8140b00 <_fini>, rtld_fini=0x4000a534 <_dl_fini>,
stack_end=0xbffff90c) at ../sysdeps/generic/libc-start.c:129

Now, it appears that all the lines in comm.c that have errors all have something to do with MXP. Any suggestions?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Toy   (206 posts)  Bio
Date Reply #8 on Thu 08 Aug 2002 04:16 AM (UTC)
Message
OK... I took the Comm.c File from the original SMAUG1.4A download I originally got, and I still am suffering from the same crashing problem, and the debugger still points to that file as the problem's source. Any feedback would be awesome..

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #9 on Fri 09 Aug 2002 02:25 AM (UTC)
Message
Judging by the bt it is trying to resolve a host name. Look in system/system.dat and try changing:


CheckImmHost 1
Nameresolving 1


to


CheckImmHost 0
Nameresolving 0

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #10 on Fri 09 Aug 2002 05:44 AM (UTC)
Message
Changed the Immhost check and the Name Resolution stuff. Same problem. Any other thoughts?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Toy   (206 posts)  Bio
Date Reply #11 on Sat 10 Aug 2002 02:40 AM (UTC)
Message
I came up with an idea of how to get around the problem for right now until a solution is discovered. But I'm still not very good with linux yet, so how would I go about writing a batch file in linux that would turn the mud back on when it crashes??

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Creeper386   USA  (62 posts)  Bio
Date Reply #12 on Sat 10 Aug 2002 08:25 AM (UTC)
Message
Well... I'm not sure about the batch file in linux but if you know alittle about the system I'm included my dos batch file below that might help some...

Hope it helps.

if EXIST c:\cygwin\home\myname\smaug\dist\area\shutdown.txt DEL shutdown.txt

:loop
c:\cygwin\home\myname\smaug\dist\area\smaug.exe
if EXIST c:\cygwin\home\myname\smaug\dist\area\shutdown.txt goto end
wait 15
goto loop

:end
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #13 on Sat 10 Aug 2002 11:11 AM (UTC)
Message
Since my solution didn't work, and since the crash was in memory allocation, it would suggest corrupted memory, which could be almost anywhere.

Strange it only happens under Linux though.

Here is one idea, if you haven't done it already. Sometimes these crashes can occur if you change a .h file (eg. mud.h) but don't recompile everything.

Try this:

rm *.o
make

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #14 on Sat 10 Aug 2002 10:00 PM (UTC)
Message
That didn't work Nick. So me and my team has decided to just start fresh and work on the code the way I did orignally, and see what caused the problem: snippet by snippet, inch of code by inch of code. I'll post my results if and when I find out whatever caused the problem.

-Alexander, starting fresh and glad he has plently of free time.

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
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.


36,711 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.