Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
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
LOP 1.45
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Yahoo!, Yandex, DotBot, Bing

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » A little help.
Forum Rules | Mark all | Recent Posts

A little help.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 26, 2010, 9:23 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Getting crashes when I compile under the lastest version of GCC

#0 0xb7de6a16 in raise () from /lib/libc.so.6
#1 0xb7de8318 in abort () from /lib/libc.so.6
#2 0x0816df87 in free (mem=0x96930e0) at malloc.c:4454
#3 0x0811f77f in free_char (ch=0x9692d38) at db.c:4641
#4 0x0814d1ba in clean_char_queue () at handler.c:5035
#5 0x08238fc5 in update_handler () at update.c:4267
#6 0x08111c92 in game_loop () at comm.c:1017
#7 0x08112501 in main (argc=Cannot access memory at address 0x7aca
) at comm.c:421

Malloc.c line 4454
Which is found in DLFREE
      USAGE_ERROR_ACTION( fm, p );

Line 4641 in db.c
Which is in free_char. It only happens when someone logs out and then it doesn't happen everytime.
    DISPOSE( ch->pcdata );
       
Post is unread #2 Jan 26, 2010, 9:42 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You're probably freeing something twice. This is extremely hard to debug with just the information given. You should try running it in valgrind.
       
Post is unread #3 Jan 27, 2010, 5:34 am
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I think this is what causing it.

malloc.c: In function 'mmap_resize':
malloc.c:3178: warning: implicit declaration of function 'mremap'
malloc.c: In function 'sys_trim':
malloc.c:3612: warning: comparison between pointer and integer

Line 3178
   char *cp = ( char * )CALL_MREMAP( ( char * )oldp - offset,
                                      oldmmsize, newmmsize, 1 );

if( ( CALL_MREMAP( sp->base, sp->size, newsize, 0 ) != MFAIL ) ||
( CALL_MUNMAP( sp->base + newsize, extra ) == 0 ) )
[code]
Wtf does Malloc.c do?
       
Post is unread #4 Jan 27, 2010, 5:42 am   Last edited Jan 27, 2010, 5:49 am by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I am running Valgrind now just in case.

--2678-- REDIR: 0x411b180 (stpcpy) redirected to 0x40270d0 (stpcpy)
--2678-- Reading syms from /lib/libnss_files-2.8.90.so (0x4C3C000)
--2678-- Reading debug info from /lib/libnss_files-2.8.90.so...
--2678-- ... CRC mismatch (computed 2e2486eb wanted 51952b09)
--2678--    object doesn't have a symbol table
--2678-- REDIR: 0x411a110 (strncmp) redirected to 0x40266a0 (strncmp)
--2678-- REDIR: 0x411a220 (strncpy) redirected to 0x4026560 (strncpy)
--2678-- REDIR: 0x41197e0 (index) redirected to 0x4026170 (index)
--2678-- Reading syms from /lib/libnss_mdns4_minimal.so.2 (0x4C32000)
--2678-- Reading debug info from /lib/libnss_mdns4_minimal.so.2...
--2678-- ... CRC mismatch (computed 12120a7f wanted 938d7038)
--2678--    object doesn't have a symbol table
--2678-- Reading syms from /lib/libnss_dns-2.8.90.so (0x4C35000)
--2678-- Reading debug info from /lib/libnss_dns-2.8.90.so...
--2678-- ... CRC mismatch (computed 2db79297 wanted 96d290e1)
--2678--    object doesn't have a symbol table
--2678-- Reading syms from /lib/libresolv-2.8.90.so (0x4C52000)
--2678-- Reading debug info from /lib/libresolv-2.8.90.so...
--2678-- ... CRC mismatch (computed 135f590a wanted 30cfccdd)
--2678--    object doesn't have a symbol table
--2678-- Reading syms from /lib/libnss_mdns4.so.2 (0x4C65000)
--2678-- Reading debug info from /lib/libnss_mdns4.so.2...
--2678-- ... CRC mismatch (computed e2733a3b wanted f8a700a8)
--2678--    object doesn't have a symbol table
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x8155F17: str_alloc (hashstr.c:50)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==

==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x4026743: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==

==2678== ERROR SUMMARY: 2133 errors from 9 contexts (suppressed: 41 from 1)
==2678==
==2678== 1 errors in context 1 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x40264B1: strcpy (mc_replace_strmem.c:268)
==2678==    by 0x8155FA3: str_alloc (string3.h:106)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 13 errors in context 2 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x4026749: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 14 errors in context 3 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x40264C5: strcpy (mc_replace_strmem.c:268)
==2678==    by 0x8155FA3: str_alloc (string3.h:106)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 15 errors in context 4 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x8155F17: str_alloc (hashstr.c:50)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 28 errors in context 5 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x4026758: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 41 errors in context 6 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x4026766: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 669 errors in context 7 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x8155F59: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 676 errors in context 8 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x402676F: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
==2678==
==2678== 676 errors in context 9 of 9:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678==    at 0x4026743: strcmp (mc_replace_strmem.c:337)
==2678==    by 0x8155F56: str_alloc (hashstr.c:54)
==2678==    by 0x810B6E8: new_descriptor (comm.c:1218)
==2678==    by 0x810C0AD: accept_new (comm.c:841)
==2678==    by 0x81118AD: game_loop (comm.c:869)
==2678==    by 0x8112500: main (comm.c:421)
--2678--
--2678-- supp:     41 dl-hack3-cond-1
==2678==
==2678== IN SUMMARY: 2133 errors from 9 contexts (suppressed: 41 from 1)
==2678==
==2678== malloc/free: in use at exit: 0 bytes in 0 blocks.
==2678== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==2678==
==2678== All heap blocks were freed -- no leaks are possible.
--2678--  memcheck: sanity checks: 5660 cheap, 87 expensive
--2678--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--2678--  memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
--2678--  memcheck: auxmaps_L2: 0 searches, 0 nodes
--2678--  memcheck: SMs: n_issued      = 312 (4992k, 4M)
--2678--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--2678--  memcheck: SMs: max_noaccess  = 65535 (1048560k, 1023M)
--2678--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--2678--  memcheck: SMs: max_defined   = 80 (1280k, 1M)
--2678--  memcheck: SMs: max_non_DSM   = 312 (4992k, 4M)
--2678--  memcheck: max sec V bit nodes:    1 (0k, 0M)
--2678--  memcheck: set_sec_vbits8 calls: 1 (new: 1, updates: 0)
--2678--  memcheck: max shadow mem size:   5296k, 5M
--2678-- translate:            fast SP updates identified: 23,846 ( 86.5%)
--2678-- translate:   generic_known SP updates identified: 3,347 ( 12.1%)
--2678-- translate: generic_unknown SP updates identified: 365 (  1.3%)
--2678--     tt/tc: 196,268 tt lookups requiring 219,494 probes
--2678--     tt/tc: 196,268 fast-cache updates, 7 flushes
--2678--  transtab: new        15,050 (366,034 -> 5,227,932; ratio 142:10) [0 scs]
--2678--  transtab: dumped     0 (0 -> ??)
--2678--  transtab: discarded  521 (10,666 -> ??)
--2678-- scheduler: 566,035,141 jumps (bb entries).
--2678-- scheduler: 5,660/208,172 major/minor sched events.
--2678--    sanity: 5661 cheap, 87 expensive checks.
--2678--    exectx: 769 lists, 189 contexts (avg 0 per list)
--2678--    exectx: 3,339 searches, 3,176 full compares (951 per 1000)
--2678--    exectx: 0 cmp2, 6,909 cmp4, 0 cmpAll
--2678--  errormgr: 29 supplist searches, 879 comparisons during search
--2678--  errormgr: 2,174 errlist searches, 6,909 comparisons during search

No clue what any of that means.
       
Post is unread #5 Jan 27, 2010, 7:08 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

What exactly are you compiling here, have you changed it, and where is this 'malloc.c' file that you're referring to?
       
Post is unread #6 Jan 27, 2010, 7:43 am   Last edited Jan 27, 2010, 7:44 am by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

a dbsaga codebase and idk what malloc.c is it's just a file in the codebase that I have no clue what it does. it compiles find under gcc-4.1 but if I try compiling under the current version thats when everything starts crashing.
       
Post is unread #7 Jan 27, 2010, 8:41 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Oh, so this isn't SmaugFUSS; it's posted in the SmaugFUSS section, and you didn't mention your base in the first post, so I assumed it was SmaugFUSS.

I'm not really sure how to help you here. malloc.c means that somebody had the really clever idea of rewriting their own memory allocator. That's a very bad idea in almost all cases. Chances are they screwed up somewhere. I'm not sure why the compiler version would make a difference but sometimes they fix small problems that reveal errors in other code.
       
Post is unread #8 Jan 27, 2010, 8:52 am
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

So how would I go about removing malloc.c and using the original ones?
       
Post is unread #9 Jan 27, 2010, 9:06 am
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I really would appericate any kind of help my mud has players and when it crashes over and over it is caused some big problems.
       
Post is unread #10 Jan 27, 2010, 9:11 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Try reverting to the older compiler version, it should be available as gcc-4.1 or something like that. If it isn't talk to your systems administrator to install it alongside the new version.
       
Post is unread #11 Jan 27, 2010, 9:23 am   Last edited Jan 27, 2010, 9:32 am by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I think I found it, I had a int set as a word in the pcdata. should be fixed now, if not I will let you know. I took out malloc.c though.
       
Post is unread #12 Jan 27, 2010, 10:21 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You probably don't want to just remove the file without changing anything else as you won't be able to compile anymore...
       
Post is unread #13 Jan 27, 2010, 12:51 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

If that's the same malloc.c I'm thinking of, it was something that showed up briefly ages ago in some packages for Smaug and SWR. Nobody then really knew why it got added as removing it never caused any issues. Some of the packages never even used it in the Makefile. I guess that also means the dbsaga codebase was based on one of these old packages.
       
Post is unread #14 Jan 27, 2010, 1:15 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

yeah, dbsaga really needs to be updated with the fuss touch.
       
Pages:<< prev 1 next >>