Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Google, DotBot

Members: 0
Guests: 20
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Help Crashing
Forum Rules | Mark all | Recent Posts

Help Crashing
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #1 Mar 9, 2009, 4:49 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Okay it seems when I copyover and then someone quits the mud crashes, it doesn't crash when people quit who weren't online when a copyover happened, and it seems to happen at random times.

I used gdb and I got all of this.
*** glibc detected *** smaug: double free or corruption (!prev): 0x091ff5c8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7e00b16]
/lib/libc.so.6(cfree+0x90)[0xb7e04070]
smaug(free_desc+0xf9)[0x80cd0a3]
smaug(close_socket+0x3ec)[0x80cd550]
smaug(extract_char+0x356)[0x80fff1b]
smaug(char_quit+0x30e)[0x8063070]
smaug(do_quit+0x121)[0x80631e6]
smaug(interpret+0xa01)[0x810b635]
smaug(game_loop+0x303)[0x80d0edb]
smaug(main+0x496)[0x80d17cf]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb7daddec]
smaug[0x8061341]
======= Memory map: ========
08048000-0820f000 r-xp 00000000 00:31 222954726                          /muds/dbr/nick/dbnu/src/smaug
0820f000-08210000 rw-p 001c7000 00:31 222954726                          /muds/dbr/nick/dbnu/src/smaug
08210000-0824a000 rw-p 08210000 00:00 0
09092000-09220000 rw-p 09092000 00:00 0                                  [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7d82000-b7d8d000 r-xp 00000000 00:31 170810412                          /lib/libgcc_s-4.1.2-20080102.so.1
b7d8d000-b7d8e000 rw-p 0000a000 00:31 170810412                          /lib/libgcc_s-4.1.2-20080102.so.1
b7d97000-b7d98000 rw-p b7d97000 00:00 0
b7d98000-b7ed5000 r-xp 00000000 00:31 170810354                          /lib/libc-2.5.so
b7ed5000-b7ed7000 r--p 0013c000 00:31 170810354                          /lib/libc-2.5.so
b7ed7000-b7ed8000 rw-p 0013e000 00:31 170810354                          /lib/libc-2.5.so
b7ed8000-b7edb000 rw-p b7ed8000 00:00 0
b7edb000-b7f00000 r-xp 00000000 00:31 170810370                          /lib/libm-2.5.so
b7f00000-b7f01000 r--p 00024000 00:31 170810370                          /lib/libm-2.5.so
b7f01000-b7f02000 rw-p 00025000 00:31 170810370                          /lib/libm-2.5.so
b7f02000-b7f0b000 r-xp 00000000 00:31 170810470                          /lib/libcrypt-2.5.so
b7f0b000-b7f0c000 r--p 00008000 00:31 170810470                          /lib/libcrypt-2.5.so
b7f0c000-b7f0d000 rw-p 00009000 00:31 170810470                          /lib/libcrypt-2.5.so
b7f0d000-b7f35000 rw-p b7f0d000 00:00 0
b7f35000-b7f37000 r-xp 00000000 00:31 170810334                          /lib/libdl-2.5.so
b7f37000-b7f38000 r--p 00001000 00:31 170810334                          /lib/libdl-2.5.so
b7f38000-b7f39000 rw-p 00002000 00:31 170810334                          /lib/libdl-2.5.so
b7f41000-b7f42000 rw-p b7f41000 00:00 0
b7f42000-b7f5c000 r-xp 00000000 00:31 170810472                          /lib/ld-2.5.so
b7f5c000-b7f5d000 r--p 00019000 00:31 170810472                          /lib/ld-2.5.so
b7f5d000-b7f5e000 rw-p 0001a000 00:31 170810472                          /lib/ld-2.5.so
bfc45000-bfc5e000 rw-p bfc45000 00:00 0                                  [stack]

Program received signal SIGABRT, Aborted

at first I thoight the problem was free_char until I replaced it with original smaug1.4 and then again with smaugfuss1.9 free_desc. and both kept causing he mud to crash still, so I not sure what my next step would be.
       
Post is unread #2 Mar 9, 2009, 5:07 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Seems like it's time to use valgrind to find out the problem. Look over the valgrind manual and search around here and gammon.com.au on some uses of Valgrind.
       
Post is unread #3 Mar 9, 2009, 5:15 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Got a side for the manual, and how to install it?
       
Post is unread #4 Mar 9, 2009, 6:21 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Here's the manual: http://valgrind.org/docs/manual/manual.html

I think you can install valgrind with yum.
       
Post is unread #5 Mar 9, 2009, 8:10 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

umm What is Yum and can it be used on a paid server?
       
Post is unread #6 Mar 9, 2009, 10:40 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Yum is the 'auto-updater" for linux (well, one of them, some installs prefer apt or a frontend...) kinda like Windows Updater. As to whether or not it can be used on a paid server depends on the permissions your host has given you, but it'd be less common for a host to not allow you access to it then for them to allow it, and if they don't let you use it then you should be able to ask them to do the install for you.
       
Post is unread #7 Mar 10, 2009, 8:23 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Normally the package managers are limited to the root user, because they install system-wide. Sometimes you can convince them to install to a user's directory but in my experience that is not the case. Generally if you need something installed on a system you don't control, you need to ask the system administrator and hope. :wink:

(That said, a paid MUD server should definitely have valgrind... I imagine the case wouldn't be very hard to make to install it. But they might be wary of people running it for too long...)
       
Post is unread #8 Mar 19, 2009, 8:07 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

So it is installed, but after reading the guide, it seems like I am more confused then before >.> Lol
       
Post is unread #9 Mar 19, 2009, 9:03 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

So I got it to work, But

*** glibc detected *** smaug: double free or corruption (!prev): 0x09d5f7e0 ***
======= Backtrace: =========
/lib/libc.so.6[0x178d06]
/lib/libc.so.6(cfree+0x90)[0x17c1e0]
smaug(free_desc+0xf9)[0x80cd0a3]
smaug(close_socket+0x3ec)[0x80cd550]
smaug(extract_char+0x356)[0x80ffeab]
smaug(char_quit+0x30e)[0x8063070]
smaug(do_quit+0x121)[0x80631e6]
smaug(interpret+0xa01)[0x810b5c5]
smaug(do_force+0x133)[0x8090692]
smaug(interpret+0xa01)[0x810b5c5]
smaug(game_loop+0x303)[0x80d0edb]
smaug(main+0x496)[0x80d17cf]
/lib/libc.so.6(__libc_start_main+0xdc)[0x125dec]
smaug[0x8061341]
======= Memory map: ========
00110000-0024d000 r-xp 00000000 fd:01 27690891 /lib/libc-2.5.so
0024d000-0024f000 r--p 0013d000 fd:01 27690891 /lib/libc-2.5.so
0024f000-00250000 rw-p 0013f000 fd:01 27690891 /lib/libc-2.5.so
00250000-00253000 rw-p 00250000 00:00 0
002e4000-002ed000 r-xp 00000000 fd:01 27690927 /lib/libcrypt-2.5.so
002ed000-002ee000 r--p 00008000 fd:01 27690927 /lib/libcrypt-2.5.so
002ee000-002ef000 rw-p 00009000 fd:01 27690927 /lib/libcrypt-2.5.so
002ef000-00316000 rw-p 002ef000 00:00 0
0063a000-00645000 r-xp 00000000 fd:01 27691020 /lib/libgcc_s-4.1.2-20080102.so.1
00645000-00646000 rw-p 0000a000 fd:01 27691020 /lib/libgcc_s-4.1.2-20080102.so.1
00752000-0076c000 r-xp 00000000 fd:01 27690932 /lib/ld-2.5.so
0076c000-0076d000 r--p 00019000 fd:01 27690932 /lib/ld-2.5.so
0076d000-0076e000 rw-p 0001a000 fd:01 27690932 /lib/ld-2.5.so
00999000-0099a000 r-xp 00999000 00:00 0 [vdso]
00afe000-00b00000 r-xp 00000000 fd:01 27690893 /lib/libdl-2.5.so
00b00000-00b01000 r--p 00001000 fd:01 27690893 /lib/libdl-2.5.so
00b01000-00b02000 rw-p 00002000 fd:01 27690893 /lib/libdl-2.5.so
00c7a000-00c9f000 r-xp 00000000 fd:01 27691117 /lib/libm-2.5.so
00c9f000-00ca0000 r--p 00024000 fd:01 27691117 /lib/libm-2.5.so
00ca0000-00ca1000 rw-p 00025000 fd:01 27691117 /lib/libm-2.5.so
08048000-0820f000 r-xp 00000000 fd:01 28886181 /home/jpelt/dbnu/src/smaug
0820f000-08210000 rw-p 001c7000 fd:01 28886181 /home/jpelt/dbnu/src/smaug
08210000-0824a000 rw-p 08210000 00:00 0
09bec000-09d7a000 rw-p 09bec000 00:00 0 [heap]
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f56000-b7f58000 rw-p b7f56000 00:00 0
b7f5e000-b7f5f000 rw-p b7f5e000 00:00 0
bf84a000-bf864000 rw-p bf84a000 00:00 0 [stack]
./grind: line 1: 24349 Aborted (core dumped) valgrind -v --leak-check=yes --show-reachable=yes ../src/smaug 4322
I think that is the same thing as before?

       
Post is unread #10 Mar 19, 2009, 9:03 pm   Last edited Mar 19, 2009, 9:12 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I still don't know what is crashing it. and valgrind gave me nothing.... Any ideas?
       
Post is unread #11 Mar 20, 2009, 8:57 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

How are you running valgrind? Are you doing it to boot the MUD? Do you encounter anything in valgrind before the crash?
       
Post is unread #12 Mar 20, 2009, 11:25 am
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Well there is this grind thing in my area folder. I did ./grind & and it brough up the the mud. During which it pointed out certain lines in the code that were STRFREE null things, So I fixed the certain lines. Then I would copyover and force all quit then it would crash. and that message would come up. h
       
Post is unread #13 Mar 20, 2009, 2:06 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Well, how exactly did you "fix" the lines in question?
       
Post is unread #14 Mar 21, 2009, 5:12 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Don't use the & when running the ./grind command. You don't want this going to background when you're using valgrind.
       
Post is unread #15 Mar 22, 2009, 1:48 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I got this no clue what it means



Sun Mar 22 15:46:00 2009 :: Uvall@***********ident not active)) has connected.
--32324-- REDIR: 0x40F8370 (strncat) redirected to 0x40220E0 (strncat)
       
Post is unread #16 Mar 22, 2009, 2:10 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

That's harmless, I wouldn't worry about it. If you're not invoking valgrind directly, can you paste the contents of the script that runs it?
       
Post is unread #17 Mar 22, 2009, 3:14 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Well, First off I thought it was the old copyover system so I replaced it with samson's and now I get this



==13836== Invalid read of size 4
==13836==    at 0x81A2951: do_copyover (in /home/jpelt/dbnu/src/smaug)
==13836==    by 0x810B084: interpret (in /home/jpelt/dbnu/src/smaug)
==13836==    by 0x80D0960: game_loop (in /home/jpelt/dbnu/src/smaug)
==13836==    by 0x80D126D: main (in /home/jpelt/dbnu/src/smaug)
==13836==  Address 0x1C is not stack'd, malloc'd or (recently) free'd


but as for the script
valgrind -v --tool=memcheck --leak-check=yes --show-reachable=yes --db-attach=yes --db-command="gdb -nw %f %p" --num-callers=10 --track-fds=yes --suppressions=../src/vg_suppress.supp ../src/smaug 4322
       
Post is unread #18 Mar 22, 2009, 5:07 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Generally speaking it's best to not make changes without a good reason to do so when tracking down a bug, because it's possible (and sometimes likely) that you're just introducing more problems.

Is your MUD being compiled with full debugging? Look for -g3 in the makefile CFLAGS. You should be getting line numbers from Valgrind: it will show you exactly where you're reading the bogus memory. At the moment all you know is that it's in the copyover code somewhere.
       
Post is unread #19 Mar 22, 2009, 5:58 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

IT says this:
C_FLAGS = $(OPT_FLAG) -g3 $(PROF) $(NOCRYPT) $(DBUGFLG) $(SOLARIS_FLAG) $(TIME) $(REG) -export-dynamic


I and it's not giving me the numbers, I am so confused right now.
       
Post is unread #20 Mar 22, 2009, 9:00 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

So then I found the point, that was crashing it and tested many times. The STRFREE( d->host ) part of Free_Desc was doing it because as soon as I commented it out it stopped crashing. Any ideas why?

void free_desc( DESCRIPTOR_DATA *d )
{
    kill_auth(d);
    closesocket( d->descriptor );
   // STRFREE( d->host );
    DISPOSE( d->outbuf );
    STRFREE( d->user );    /* identd */
    if ( d->pagebuf )
        DISPOSE( d->pagebuf );
    if ( d )
        DISPOSE( d );
/*    --num_descriptors;  This is called from more than close_socket -- Alty */
    return;
}
       
Pages:<< prev 1, 2 next >>