Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 SmaugFUSS 1.9.2
Today, 3:17 am
By Quixadhal
AFKMud 2.2.0
Nov 21, 2014, 7:15 pm
By Samson
CIDR Range Banning
Nov 21, 2014, 2:01 pm
By Samson
Compiling Lop 1.44b, errors.
Nov 17, 2014, 1:12 pm
By Remcon
SmaugFUSS 1.9.1
Nov 15, 2014, 2:44 pm
By GatewaySysop
SmaugFUSS 1.9.2
Author: Various
Submitted by: Samson
AFKMud 2.2.0
Author: AFKMud Team
Submitted by: Samson
SmaugFUSS 1.9.1
Author: Various
Submitted by: Samson
AFKMud 2.1.6
Author: AFKMud Team
Submitted by: Samson
6D update
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Google, Yahoo!, Majestic-12, Yandex, Bing, Lucif

Members: 1
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
455
3,647
19,036
568
Taenar
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Odd core dumps.
Forum Rules | Mark all | Recent Posts

Odd core dumps.
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2, 3 next >>
Post is unread #1 Nov 8, 2008, 11:56 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

I've started getting my area folder filled with core dumps. I'm not sure how they got here but everytime I start the MUD it fills with these core dumps, I havent really altered anything game breaking but the latest core looked like this.

Core was generated by `../src/smaug 4020'.
Program terminated with signal 11, Segmentation fault.
#0  0x40180dac in ?? ()


If anyone has any idea on what is exactly wrong here I would love some insight because I'm lost right now!
       
Post is unread #2 Nov 9, 2008, 12:16 am
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

I ran gdb through the src folder and the core was different in content x_x

Core was generated by `../src/smaug 4020'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x40180dac in _int_malloc () from /lib/tls/libc.so.6


Hopefully this will help :stare:
       
Post is unread #3 Nov 9, 2008, 9:31 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You need to start looking at backtraces to figure out where this is coming from in your code. If you have access to valgrind, I would suggest trying it too.

Nick Gammon wrote a very good starter guide to gdb which I suggest you go through just to get familiar with what the tool can do for you.
       
Post is unread #4 Nov 9, 2008, 10:29 am
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

I read the guide but it was a lot to digest quickly. I backtraced and got this.

#0  0x40180dac in _int_malloc () from /lib/tls/libc.so.6
#1  0x401800fd in malloc () from /lib/tls/libc.so.6
#2  0x4016f073 in __fopen_internal () from /lib/tls/libc.so.6
#3  0x4016f13e in fopen@@GLIBC_2.1 () from /lib/tls/libc.so.6
#4  0x080736c5 in imc_load_commands () at imc.c:4401
#5  0x08076018 in imc_startup (force=false, desc=-1, connected=false)
    at imc.c:5323
#6  0x0810eae0 in main (argc=2, argv=0xbfffd3a4) at comm.c:517


So with bt do I want to look at whatever is in #6? I'm still pretty new to all of this! and this bug came out of the blue so I sound extra clueless.
       
Post is unread #5 Nov 9, 2008, 10:40 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You generally want to go to the first point in your code, and not the system libraries, in the backtrace. It looks like it's frame #4, something to do with IMC. Have you changed anything with IMC recently? You can try going to the line in question -- imc.c line 4401 -- and seeing if anything looks amiss.
       
Post is unread #6 Nov 9, 2008, 10:45 am
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

bool imc_load_commands( void )
{
   FILE *fp;
   IMC_CMD_DATA *cmd;

   first_imc_command = last_imc_command = NULL;

   imclog( "%s", "Loading IMC2 command table..." );

   if( !( fp = fopen( IMC_CMD_FILE, "r" ) ) )
   {
      imclog( "%s", "No command table found." );
      return FALSE;
   }



I have not messed with IMC at all, in fact I've never used IMC this is what is bugging the carp out of me!
       
Post is unread #7 Nov 9, 2008, 12:01 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

One thing to try when you're getting results like this is to "make clean" and then "make".

Another thing is to try to carefully recall every single file you changed. If need be, get a fresh copy of the codebase and run "diff" on your file and the original one in order to get an exact list in case you forgot something.

Finally, try using valgrind if you have access to it: just put "valgrind" in front of your normal startup command (presumably ../src/smaug 4000 from inside your area directory).
       
Post is unread #8 Nov 9, 2008, 4:13 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Which part in imc_load_commands is it crashing at?
       
Post is unread #9 Nov 9, 2008, 4:34 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

 if( !( fp = fopen( IMC_CMD_FILE, "r" ) ) )
   {
      imclog( "%s", "No command table found." );
      return FALSE;
   }


Thats line 4401 and its code block. Is the line of code shown in backtrace, is that what is considered the line that is crashing it? Thanks in advance.
       
Post is unread #10 Nov 9, 2008, 4:43 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Which line there? The fopen one?
       
Post is unread #11 Nov 9, 2008, 4:44 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

yes the fopen one. Any idea what could be causing this madness? I hope so :biggrin: :biggrin: :biggrin:
       
Post is unread #12 Nov 9, 2008, 4:50 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I would assume the ifcheck should already be checking this, but...

Look for IMC_CMD_FILE in the header file(s). What is it? Make sure it exists as a file.
       
Post is unread #13 Nov 9, 2008, 5:07 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

IMC_CMD_FILE is in the header through imc.h

#define IMC_CMD_FILE     IMC_DIR "imc.commands"


struct imc_command_table
{
   IMC_CMD_DATA *next;
   IMC_CMD_DATA *prev;
   IMC_ALIAS *first_alias;
   IMC_ALIAS *last_alias;
   IMC_FUN *function;
   char *name;
   int level;
   bool connected;
};

When I hit run durring debug this comes up
Sun Nov 9 19:02:55 2008 :: Booting Database
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sun Nov 9 19:02:55 2008 :: [*****] BOOT: ---------------------[ Boot Log ]--------------------
Sun Nov 9 19:02:55 2008 :: Initializing libdl support...
Sun Nov 9 19:02:55 2008 :: Loading commands...
Sun Nov 9 19:02:55 2008 :: Loading spec_funs...
Sun Nov 9 19:02:55 2008 :: Loading sysdata configuration...
Sun Nov 9 19:02:55 2008 :: Loading socials
Sun Nov 9 19:02:55 2008 :: Loading skill table
Sun Nov 9 19:02:55 2008 :: Sorting skill table...
Sun Nov 9 19:02:55 2008 :: Creating skill table sorted by type...
Sun Nov 9 19:02:55 2008 :: Remapping slots to sns
Sun Nov 9 19:02:55 2008 :: Loading classes
Sun Nov 9 19:02:55 2008 :: Loading races
Sun Nov 9 19:02:55 2008 :: Loading news data
Sun Nov 9 19:02:55 2008 :: Loading liquids
Sun Nov 9 19:02:55 2008 :: Loading mixtures
Sun Nov 9 19:02:55 2008 :: Loading herb table
Sun Nov 9 19:02:55 2008 :: Loading tongues
Sun Nov 9 19:02:55 2008 :: Making wizlist
Sun Nov 9 19:02:55 2008 :: Initializing random number generator
Sun Nov 9 19:02:55 2008 :: Setting time and weather.
Sun Nov 9 19:02:55 2008 :: Loading holiday chart...
Sun Nov 9 19:02:55 2008 :: Loading DNS cache...
Sun Nov 9 19:02:55 2008 :: Assigning gsn's
Sun Nov 9 19:02:55 2008 :: Reading in area files...
area.lst: No such file or directory

Program exited with code 01.

BUT when I check my logs they all stop at this line...
Sun Nov 9 16:02:08 2008 :: IMC: Loading IMC2 command table...

Maybe thats another clue? :stare:
       
Post is unread #14 Nov 9, 2008, 5:13 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Uhh, how are you booting the MUD?
       
Post is unread #15 Nov 9, 2008, 5:24 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

nohup ./startup &
       
Post is unread #16 Nov 9, 2008, 7:45 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

And that's in src right? For some reason it can't find the area.lst file. Does that exist in the areas folder?

Try running it normally (exec run from area dir)
       
Post is unread #17 Nov 9, 2008, 8:23 pm
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

still getting the core dumps...8 core dumps per minute! joy...

as always my log file stops here...

Sun Nov 9 22:17:23 2008 :: Initializing socket
Sun Nov 9 22:17:23 2008 :: IMC: Loading IMC2 command table...

So it has something to do with this IMC2 command table...can't I just disable IMC? I don't know how this error even got started! I've lost a couple days work over mulling on this error and trying to google hints to as what could be wrong...thanks everyone for the help.

       
Post is unread #18 Nov 9, 2008, 8:49 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

8 times a minute? That doesn't sound like you're running it normally if it's dumping over and over (that means the process is being restarted).
       
Post is unread #19 Nov 9, 2008, 10:27 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

You should be able to disable IMC in the makefile just comment out the IMC line in the makefile:

change:
#IMC2 - Comment out to disable IMC2 support
IMC = 1


to look like:
#IMC2 - Comment out to disable IMC2 support
#IMC = 1


And see if you can get your mud started up, if so. The problem has something to do with IMC specifically.
       
Post is unread #20 Nov 10, 2008, 3:22 am
Go to the top of the page
Go to the bottom of the page

canonfruitpunch
Fledgling
GroupMembers
Posts19
JoinedOct 24, 2008

@Zeno Yeah there is something wrong with the code, the problem is I really do not know how it happened because I edited none of the files coming up in the core dumps.

@Kerberus I disabled IMC2 support and it now takes me to the MUD start up screen! Only problem is that it will sometimes crash before you can log on or crash as soon as you put your name in.

Here is the new core dump I'm getting...
Core was generated by `../src/smaug 4020'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
#0  0x401812c7 in _int_free () from /lib/tls/libc.so.6

Typing bt gives me these results...
#0  0x401812c7 in _int_free () from /lib/tls/libc.so.6
#1  0x40180278 in free () from /lib/tls/libc.so.6
#2  0x0812f2a0 in trv_dispose (p=0xbfffa0f4) at handler.c:319
#3  0x0817b408 in mprog_greet_trigger (ch=0x8afdf50) at mud_prog.c:2873
#4  0x080829a5 in move_char (ch=0x8afdf50, pexit=0x8a2b6e8, fall=0)
    at act_move.c:1235
#5  0x081cca99 in mobile_update () at update.c:761
#6  0x081d0004 in update_handler () at update.c:1981
#7  0x080f68c3 in game_loop () at comm.c:878
#8  0x080f5d94 in main (argc=2, argv=0xbfffc704) at comm.c:528

and here is trv_dispose...I'm not even sure what it does...never edited this code in my life yet it is causing me some horrible grief!
void trv_dispose( TRV_DATA ** p )
{
   if( *p )
   {
      free( (*p)->el );
      free( *p );
      *p = NULL;
   }
   else
      bug( "%s: NULL pointer.", __FUNCTION__ );
}


Thanks everyone for the help so far and for helping a novice coder, code his dreams :biggrin:
       
Pages:<< prev 1, 2, 3 next >>