View Issue Details

IDProjectCategoryView StatusLast Update
0000693LDMud 3.3Runtimepublic2011-08-22 16:37
Reporterchaos Assigned Tozesstra  
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionunable to reproduce 
Platformamd64OSDebianOS Version2.6.18-5
Product Version3.3.719 
Target Version3.3.721 
Summary0000693: "ref count 0 but not destructed" dealloc_object() error
DescriptionI'm trying to port my MUD from 3.2.15 to 3.3.719 and having a lot of malloc-related crashes. The mostly come in two kinds; double-frees and "ref count 0 but not destructed" errors. Right now, I'm posting the driver output and gdb backtrace from an instance of the latter that came up fairly nicely in the course of my debugging attempts, in case it tells somebody something useful.
Additional Informationdriver output:

2009.10.23 18:27:45 Object 0x308d7ed0 d/Exoma/River_Tethys/mon/deathroach#19133 ref count 0, but not destructed.
2009.10.23 18:27:45 Current object was def/descriptor/interact
def/maneuver/punch std/def/interaction.c line 1058
0x5654454: 8 19 identifier (1: 64) line 1058
0x5654456: 50 < (2: 65)
0x5654457: 108 branch_when_zero (1: 64)
0x565445e: 31 8 local (0: 63) line 1060
0x5654460: 169 1 aggregate (1: 64)
0x5654463: 126 7 push_local_variable_lvalue (1: 64)
0x5654465: 79 (void)+= (2: 65) line 1061
0x5654466: 181 foreach_next (0: 63)
0x5654404: 98 265 clear_locals (0: 63) line 1053
0x5654407: 99 save_arg_frame (0: 63)
0x5654408: 31 0 local (1: 64)
0x565440a: 10 142 cstring0 (2: 65)
0x565440c: 31 8 local (3: 66)
0x565440e: 190 call_other (4: 67)
d/Exoma/River_Tethys/mon/gray_scavdrek#20004 mod/character/limbs.c line 2138
0x85b6f5a: 8 11 identifier (0: 67) line 2138
0x85b6f5c: 31 0 local (1: 68)
0x85b6f5e: 187 no_warn_deprecated (2: 69)
0x85b6f5f: 62 index (2: 69)
0x85b6f60: 18 18 clit (1: 68)
0x85b6f62: 187 no_warn_deprecated (2: 69)
0x85b6f63: 62 index (2: 69)
0x85b6f64: 24 return (1: 68)
def/maneuver/punch std/def/interaction.c line 1053
0x565440f: 100 restore_arg_frame (2: 65) line 1053
0x5654410: 126 9 push_local_variable_lvalue (1: 64)
0x5654412: 42 (void)= (2: 65) line 1054
0x5654413: 8 24 identifier (0: 63)
0x5654415: 39 2 && (1: 64)
0x5654417: 31 9 local (0: 63)
0x5654419: 39 9 && (1: 64)
0x565441b: 31 9 local (0: 63)
0x565441d: 18 7 clit (1: 64)
0x565441f: 187 no_warn_deprecated (2: 65)
0x5654420: 62 index (2: 65)
0x5654421: 8 24 identifier (1: 64)
0x5654423: 55 & (2: 65)
0x5654424: 108 branch_when_zero (1: 64)
0x565442b: 8 25 identifier (0: 63) line 1056
0x565442d: 39 15 && (1: 64)
0x565442f: 31 9 local (0: 63)
0x5654431: 61 ! (1: 64)
0x5654432: 40 10 || (1: 64)
0x5654434: 31 9 local (0: 63)
0x5654436: 18 7 clit (1: 64)
0x5654438: 187 no_warn_deprecated (2: 65)
0x5654439: 62 index (2: 65)
0x565443a: 8 25 identifier (1: 64)
0x565443c: 55 & (2: 65)
0x565443d: 61 ! (1: 64)
0x565443e: 108 branch_when_zero (1: 64)
0x5654445: 8 19 identifier (0: 63) line 1058
0x5654447: 39 14 && (1: 64)
0x5654449: 31 9 local (0: 63)
0x565444b: 61 ! (1: 64)
0x565444c: 40 9 || (1: 64)
0x565444e: 31 9 local (0: 63)
0x5654450: 18 3 clit (1: 64)
0x5654452: 187 no_warn_deprecated (2: 65)
0x5654453: 62 index (2: 65)
0x5654454: 8 19 identifier (1: 64)
0x5654456: 50 < (2: 65)
0x5654457: 108 branch_when_zero (1: 64)
0x565445e: 31 8 local (0: 63) line 1060
0x5654460: 169 1 aggregate (1: 64)
0x5654463: 126 7 push_local_variable_lvalue (1: 64)
0x5654465: 79 (void)+= (2: 65) line 1061
0x5654466: 181 101 foreach_next (0: 63)
0x5654469: 182 foreach_end (0: 63) line 1062
0x565446a: 31 7 local (0: 59)
0x565446c: 126 6 push_local_variable_lvalue (1: 60)
0x565446e: 42 (void)= (2: 61) line 1064
0x565446f: 31 2 local (0: 59)
0x5654471: 108 branch_when_zero (1: 60)
0x56544a2: 31 6 local (0: 59) line 1069
0x56544a4: 203 sizeof (1: 60)
0x56544a5: 28 switch (1: 60)
0x56544db: 31 3 local (0: 59) line 1077
0x56544dd: 18 8 clit (1: 60)
0x56544df: 187 no_warn_deprecated (2: 61)
0x56544e0: 62 index (2: 61)
0x56544e1: 18 8 clit (1: 60)
0x56544e3: 55 & (2: 61)
0x56544e4: 108 branch_when_zero (1: 60)
0x5654502: 31 3 local (0: 59) line 1079
0x5654504: 18 8 clit (1: 60)
0x5654506: 187 no_warn_deprecated (2: 61)
0x5654507: 62 index (2: 61)
0x5654508: 18 16 clit (1: 60)
0x565450a: 55 & (2: 61)
0x565450b: 108 branch_when_zero (1: 60)
0x5654529: 99 save_arg_frame (0: 59) line 1082
0x565452a: 14 number (1: 60)
0x5654533: 168 simul_efun (2: 61)
obj/master/simul_efun obj/master/sefun/services.c line 92
0x122d0e2: 8 0 identifier (0: 61) line 92
0x122d0e4: 31 0 local (1: 62)
0x122d0e6: 187 no_warn_deprecated (2: 63)
0x122d0e7: 62 index (2: 63)
0x122d0e8: 40 || (1: 62)
0x122d0f1: 24 return (1: 62)
def/maneuver/punch std/def/interaction.c line 1082
0x5654536: 31 1 local (2: 61) line 1082
0x5654538: 18 4 clit (3: 62)
0x565453a: 31 6 local (4: 63)
0x565453c: 168 simul_efun (5: 64)
obj/master/simul_efun obj/master/sefun/probability.c line 20
0x12a52f2: 31 0 local (0: 72) line 20
0x12a52f4: 212 typeof (1: 73)
0x12a52f5: 28 switch (1: 73)
0x12a52f9: 98 257 clear_locals (0: 72) line 23
0x12a52fc: 31 0 local (0: 72)
0x12a52fe: 203 sizeof (1: 73)
0x12a52ff: 126 1 push_local_variable_lvalue (1: 73)
0x12a5301: 42 (void)= (2: 74) line 24
0x12a5302: 31 1 local (0: 72)
0x12a5304: 39 9 && (1: 73)
0x12a5306: 31 0 local (0: 72)
0x12a5308: 31 0 local (1: 73)
0x12a530a: 203 sizeof (2: 74)
0x12a530b: 305 73 random (2: 74)
0x12a530d: 187 no_warn_deprecated (2: 74)
0x12a530e: 62 index (2: 74)
0x12a530f: 24 return (1: 73) line 27
def/maneuver/punch std/def/interaction.c line 1082
0x565453f: 433 funcall (5: 64) line 1082
def/descriptor/interact <lambda ?> line 0
0x3ae101b: 99 save_arg_frame (0: 67) line 0
0x3ae101c: 31 1 local (1: 68)
0x3ae101e: 31 2 local (2: 69)
0x3ae1020: 112 call_function (3: 70)
def/descriptor/interact std/def/descriptor.c line 1144
0x3cd692a: 98 514 clear_locals (0: 72) line 1144
0x3cd692d: 8 56 identifier (0: 72)
0x3cd692f: 31 0 local (1: 73)
0x3cd6931: 187 no_warn_deprecated (2: 74)
0x3cd6932: 62 index (2: 74)
0x3cd6933: 126 2 push_local_variable_lvalue (1: 73)
0x3cd6935: 42 (void)= (2: 74)
0x3cd6936: 31 2 local (0: 72) line 1145
0x3cd6938: 109 3 branch_when_non_zero (1: 73)
0x3cd693a: 31 1 local (0: 72) line 1146
0x3cd693c: 24 return (1: 73)
def/descriptor/interact <lambda ?> line 0
0x3ae1023: 100 restore_arg_frame (2: 69) line 0
0x3ae1024: 126 2 push_local_variable_lvalue (1: 68)
0x3ae1026: 42 (void)= (2: 69)
0x3ae1027: 99 save_arg_frame (0: 67)
0x3ae1028: 31 1 local (1: 68)
0x3ae102a: 31 2 local (2: 69)
0x3ae102c: 112 call_function (3: 70)
def/descriptor/interact std/def/descriptor.c line 1167
0x3cd6a42: 98 258 clear_locals (0: 71) line 1167
0x3cd6a45: 8 54 identifier (0: 71)
0x3cd6a47: 31 0 local (1: 72)
0x3cd6a49: 187 no_warn_deprecated (2: 73)
0x3cd6a4a: 62 index (2: 73)
0x3cd6a4b: 126 2 push_local_variable_lvalue (1: 72)
0x3cd6a4d: 42 (void)= (2: 73)
0x3cd6a4e: 31 2 local (0: 71) line 1168
0x3cd6a50: 39 && (1: 72)
0x3cd6a62: 108 branch_when_zero (1: 72)
0x3cd6a78: 25 return0 (0: 71) line 1170
def/descriptor/interact <lambda ?> line 0
0x3ae102f: 100 restore_arg_frame (2: 69) line 0
0x3ae1030: 93 pop_value (1: 68)
0x3ae1031: 99 save_arg_frame (0: 67)
0x3ae1032: 31 1 local (1: 68)
0x3ae1034: 31 2 local (2: 69)
0x3ae1036: 112 call_function (3: 70)
def/descriptor/interact std/def/descriptor.c line 1173
0x3cd6a9a: 8 59 identifier (0: 70) line 1173
0x3cd6a9c: 31 0 local (1: 71)
0x3cd6a9e: 187 no_warn_deprecated (2: 72)
0x3cd6a9f: 62 index (2: 72)
0x3cd6aa0: 39 && (1: 71)
0x3cd6aa4: 39 && (1: 71)
0x3cd6aaa: 108 branch_when_zero (1: 71)
0x3cd6ac0: 25 return0 (0: 70) line 1175
def/descriptor/interact <lambda ?> line 0
0x3ae1039: 100 restore_arg_frame (2: 69) line 0
0x3ae103a: 93 pop_value (1: 68)
0x3ae103b: 31 2 local (0: 67)
0x3ae103d: 31 1 local (1: 68)
0x3ae103f: 126 0 push_local_variable_lvalue (2: 69)
0x3ae1041: 131 index_lvalue (3: 70)
0x3ae1042: 41 = (2: 69)
0x3ae1043: 24 return (1: 68)
def/maneuver/punch std/def/interaction.c line 1082
0x5654541: 100 restore_arg_frame (2: 61) line 1082
0x5654542: 93 pop_value (1: 60) line 1083
0x5654543: 99 save_arg_frame (0: 59)
0x5654544: 14 number (1: 60)
0x565454d: 168 simul_efun (2: 61)
obj/master/simul_efun obj/master/sefun/services.c line 92
0x122d0e2: 8 0 identifier (0: 61) line 92
0x122d0e4: 31 0 local (1: 62)
0x122d0e6: 187 no_warn_deprecated (2: 63)
0x122d0e7: 62 index (2: 63)
0x122d0e8: 40 || (1: 62)
0x122d0f1: 24 return (1: 62)
def/maneuver/punch std/def/interaction.c line 1083
0x5654550: 31 1 local (2: 61) line 1083
0x5654552: 18 5 clit (3: 62)
0x5654554: 15 const0 (4: 63)
0x5654555: 433 funcall (5: 64)
def/descriptor/interact <lambda ?> line 0
0x3ae101b: 99 save_arg_frame (0: 67) line 0
0x3ae101c: 31 1 local (1: 68)
0x3ae101e: 31 2 local (2: 69)
0x3ae1020: 112 call_function (3: 70)
def/descriptor/interact std/def/descriptor.c line 1144
0x3cd692a: 98 514 clear_locals (0: 72) line 1144
0x3cd692d: 8 56 identifier (0: 72)
0x3cd692f: 31 0 local (1: 73)
0x3cd6931: 187 no_warn_deprecated (2: 74)
0x3cd6932: 62 index (2: 74)
d/Exoma/River_Tethys/mon/deathroach#19133 <lambda ?> line 0
0x3cd6933: 126 push_local_variable_lvalue (1: 73) line 0
0x3cd6933: 126 2 42 31 2 109 3 31
' heart_beat' in ' std/autonomon.c' ('d/Exoma/River_Tethys/mon/gray_scavdrek#20004') line 1644
' heart_beat' in 'mod/character/body.c' ('d/Exoma/River_Tethys/mon/gray_scavdrek#20004') line 3811
' reset_activity' in 'mod/character/body.c' ('d/Exoma/River_Tethys/mon/gray_scavdrek#20004') line 4220
'query_attack_forms_usable' in 'mod/character/combat.c' ('d/Exoma/River_Tethys/mon/gray_scavdrek#20004') line 2071
'query_interaction_accessible' in 'std/def/interaction.c' (' def/maneuver/punch') line 709
'interaction_validate_limbs' in 'std/def/interaction.c' (' def/maneuver/punch') line 869
'interaction_limb_sync' in 'std/def/interaction.c' (' def/maneuver/punch') line 1083
<lambda 0x3ae1019> in 'def/descriptor/interact.c' ('def/descriptor/interact') offset 8
'descriptor_processed_value' in 'std/def/descriptor.c' ('def/descriptor/interact') line 1144
2009.10.23 18:27:45 LDMud aborting on fatal error.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47695027010464 (LWP 18839)]
fatal (fmt=0x4f69f0 "Object %p %s ref count 0, but not destructed.\n") at simulate.c:587
587 *((char*)0) = 0/a;

---------------------------------------
gdb backtrace:

#0 fatal (fmt=0x4f69f0 "Object %p %s ref count 0, but not destructed.\n") at simulate.c:587
0000001 0x000000000048c07f in dealloc_object (ob=0x308d7ed0) at object.c:273
0000002 0x000000000044dbff in eval_instruction (first_instruction=<value optimized out>, initial_sp=0x7fffce49f0f8) at interpret.c:7936
0000003 0x00000000004673ff in apply_low (fun=<value optimized out>, ob=0x127b2b8, num_arg=1, b_ign_prot=true, allowRefs=false)
    at interpret.c:17096
0000004 0x0000000000467899 in int_apply (fun=0x7fffce49f248, ob=0x7fffce49f0f8, num_arg=1, b_ign_prot=<value optimized out>,
    b_use_default=false) at interpret.c:17174
0000005 0x0000000000469de2 in sapply_int (fun=0x11108e0, ob=0x127b2b8, num_arg=1, b_find_static=true, b_use_default=false)
    at interpret.c:17335
0000006 0x000000000046a2f9 in apply_master_ob (fun=0x11108e0, num_arg=1, external=true) at interpret.c:17645
0000007 0x00000000004c2c0b in fatal (fmt=0x4f69f0 "Object %p %s ref count 0, but not destructed.\n") at simulate.c:641
0000008 0x000000000048c07f in dealloc_object (ob=0x308d7ed0) at object.c:273
0000009 0x000000000044dbff in eval_instruction (first_instruction=<value optimized out>, initial_sp=0x7fffce49f0f8) at interpret.c:7936
0000010 0x0000000000469449 in int_call_lambda (lsvp=<value optimized out>, num_arg=<value optimized out>, allowRefs=false,
    external=true) at interpret.c:18217
0000011 0x0000000000469820 in v_funcall (sp=0x656120, num_arg=4) at interpret.c:20631
0000012 0x0000000000456b89 in eval_instruction (first_instruction=<value optimized out>, initial_sp=<value optimized out>)
    at interpret.c:8374
0000013 0x000000000046753e in apply_low (fun=0x4ffff78, ob=0x58645a8, num_arg=2, b_ign_prot=false, allowRefs=false)
    at interpret.c:16983
#14 0x0000000000467899 in int_apply (fun=0x7fffce49f248, ob=0x7fffce49f0f8, num_arg=1, b_ign_prot=<value optimized out>,
    b_use_default=true) at interpret.c:17174
#15 0x000000000045720d in eval_instruction (first_instruction=<value optimized out>, initial_sp=<value optimized out>)
    at interpret.c:16444
#16 0x0000000000466848 in call_function (progp=<value optimized out>, fx=<value optimized out>) at interpret.c:18539
#17 0x00000000004444cf in call_heart_beat () at heartbeat.c:289
#18 0x0000000000410b28 in backend () at backend.c:728
#19 0x000000000047711c in main (argc=1600, argv=0x5) at main.c:673
TagsNo tags attached.

Activities

zesstra

2009-10-24 03:51

administrator   ~0001548

If you can reproduce that issues (your descriptions sound like that), it would help much if you attach a small testcase. ;-) (If not, the core dump is the next best thing.)
You should disable optimization in configure as well, that makes debugging usually much more difficult.

chaos

2009-10-25 20:09

reporter   ~0001552

Reproduction isn't really simple, though I seem to be able to trigger a crash reliably by logging in, logging out, and logging in. I'm working on cases with optimization off and -g on now, and will post some of those as I go.

zesstra

2009-10-26 03:28

administrator   ~0001553

Mhmm. Could you also try the current trunk-3.3 from our subversion repository?
svn co svn://svn.bearnip.com/ldmud/3.3/trunk
and followed with ./autogen.sh in src/.

And could you check, if that crashes also work with a (minimal) mudlib of yours, which you can supply to us? Would be nice if we can limit the crash to some revision range.

chaos

2010-01-17 22:27

reporter   ~0001677

zesstra, early results with 3.3.719.2820 have me getting further than previously, so it looks like you guys may have cleaned up the issue in the normal course of events. More when I have it.

chaos

2010-01-17 22:49

reporter   ~0001678

autogen.sh produced this, though:

ls: ./acinclude.m4: No such file or directory
configure.in:769: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:770: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:771: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:772: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:773: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:774: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:775: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:840: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:950: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1022: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1046: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1094: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1119: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1245: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1359: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1511: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1532: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1649: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1669: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1824: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:1985: warning: AC_TRY_RUN called without default to allow cross compiling
configure.in:2567: warning: AC_TRY_RUN called without default to allow cross compiling
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_LINK_IFELSE
***BUG in Autoconf--please report*** AC_LINK_IFELSE
configure.in:101:AC_ARG_WITH([$1],[AC_FORM_HELP([with-$1]ifelse([$3],,[=VALUE],[=$3]),
configure.in:1355: AC_MSG_RESULT($lp_cv_has_iconv_nonconst_in)
configure.in:151: AC_MSG_RESULT($[$3])
configure.in:20: AC_COMPILE_IFELSE(
configure.in:21: [AC_LANG_PROGRAM(
configure.in:2389:AC_MSG_RESULT($LCFLAGS)
configure.in:2414:AC_MSG_RESULT($MCFLAGS)
configure.in:2454:AC_MSG_RESULT($OCFLAGS)
configure.in:2480: AC_MSG_RESULT(yes)
configure.in:2483: AC_MSG_RESULT(no)
configure.in:24: [AC_MSG_RESULT([yes])]
configure.in:2518: AC_MSG_RESULT(no)
configure.in:2522: AC_MSG_RESULT(yes)
configure.in:2548: AC_MSG_RESULT(no)
configure.in:2551: AC_MSG_RESULT(yes)
configure.in:2663: AC_MSG_RESULT(ok)
configure.in:2665: AC_MSG_RESULT(failed)
configure.in:30: [AC_MSG_RESULT([no])]
configure.in:703:AC_PROG_CC_STDC
configure.in:719:AC_MSG_RESULT($WCFLAGS)
configure.in:733:AC_C_TYPEOF
configure.in:739:AC_C_VARARRAYS
configure.in:742:AC_C_VOLATILE
configure.in:745:AC_TYPE_INT8_T
configure.in:746:AC_TYPE_INT16_T
configure.in:747:AC_TYPE_INT32_T
configure.in:748:AC_TYPE_INT64_T
configure.in:749:AC_TYPE_INTMAX_T
configure.in:750:AC_TYPE_INTPTR_T
configure.in:751:AC_TYPE_UINT8_T
configure.in:752:AC_TYPE_UINT16_T
configure.in:753:AC_TYPE_UINT32_T
configure.in:754:AC_TYPE_UINT64_T
configure.in:755:AC_TYPE_UINTMAX_T
configure.in:756:AC_TYPE_UINTPTR_T
configure.in:759:AC_TYPE_LONG_DOUBLE
configure.in:760:AC_TYPE_LONG_DOUBLE_WIDER
configure.in:761:AC_TYPE_SSIZE_T
configure.in:780:AC_CONFIG_HEADERS(machine.h)
configure.in:802:AC_HEADER_STDBOOL
configure.in:812:AC_FUNC_MKTIME
configure.in:84:AC_DEFUN([AC_FORM_HELP],[ --$1[]dnl
configure.in:94:AC_ARG_ENABLE([$1],[AC_FORM_HELP([enable-$1]ifelse([$3],,,[=($3)]),
mv: cannot stat `machine.h.in': No such file or directory

zesstra

2010-01-18 04:49

administrator   ~0001680

The stuff about autoconf looks your autoconf installation is messed up or you have a version which does not work. Please check your autoconf version(s). (I have autoconf-2.64 on my machine.)

chaos

2010-01-18 13:33

reporter   ~0001681

Okay, turns out I was overly optimistic and am still having basically the same problems. The autoconf thing was some weird Debian deal where it used 2.13 some of the time and 2.50 other times; I got it to get rid of 2.13 and it ran okay, but didn't seem to help. Right now, if I just leave the mud running long enough, it eventually dies on a "0 refcount but not destructed" error, and if I log in, log out, log in, it segfaults immediately. I've made a stripped-down mud instance, but it's still far too large to upload to mantis, so I've put it at http://lostsouls.org/ls-mantis.tar.gz. Things about it:

1) It wants to be unpacked to /home/ls; if it's somewhere else, bin/config.sh.64bit needs to be modified to tell it so
2) bin/build_ldmud.64bit is the relevant version of the build/install script
3) bin/mudloop.64bit is the relevant version of the run script; it's set up to run on port 4000, and will keep rerunning crashed instances up to 100 times unless killed
4) The driver source I'm building from is in the src directory, and there are these interesting things about it:
4a) It has a pkg-lostsouls.c, which adds some efuns we use; its integration touches Makefile.in, func_spec and string_spec
4b) object.c has modifications to present() that we need because we pass an 'observer' argument (an object) to our identity-related functions
5) I removed all the user accounts except a modified version of mine, username chaos, password password; when you've logged in, select 1 at the atman menu to incarnate as me
6) The lib will probably be upset to some degree if its mysql database is not there, so I made db/ls.sql that has its structure and the account records for me; that wants to be in a database called ls, and I removed the database u/p information so either the database needs to let the user connect with no authentication or auth will need to be set up (db_connect() is called from lib.64bit/mod/daemon/database.c)

Here's hoping the exercise is full of debuggy goodness. :)

zesstra

2010-01-18 14:22

administrator   ~0001683

Pheewwww. I am not very motivated to setup a mysql instance on my machine right now. Don't know how long that will take. Is there a way to login without it?

BTW: Do you have problems only when compiled for the x86_64 architecture? I ask, because we don't really 'support' or recommend 3.3.x on 64 bit platforms for 'live muds'. There are a number of problems in the source which have to be fixed first. We are happy about bug reports and happy to help out, but it is very probable that we won't fix all the issues with 64 bit platforms in 3.3.x.

BTW2: debugging executables with --with-optimize=high and without debug information (e.g. --enable-malloc-lpc-trace, --enable-malloc-trace, --enable-debug) is virtually impossible. I made some changes to your build script for tests here.

BTW3: The hash tables for strings (htable) and objects (otable) in 3.3.x don't support more than 65535 hash chains, might want to reduce --with-htable-size=262144 and --with-otable-size=131072 until you switch to 3.5.x.

zesstra

2010-01-18 14:31

administrator   ~0001684

I just tried without any mysql db. Unfortunately, it does not work: ;-)
2010.01.18 21:28:28 Index for [] out of bounds: 70, vector size: 0
2010.01.18 21:28:28 program: obj/master/sefun/services.c, object: obj/master/simul_efun line 92
' connect' in ' obj/master/kernel.c' (' obj/master/kernel') line 1021
<lambda 0x101bee909> in ' obj/master/kernel.c' (' obj/master/kernel') offset 16
' preinit' in ' std/daemon.c' (' daemon/shutdown') line 84
' data_check' in ' std/daemon.c' (' daemon/shutdown') line 40
' data_check' in ' mod/basic/hooks.c' (' daemon/shutdown') line 21
' service' in 'obj/master/sefun/services.c' ('obj/master/simul_efun') line 92
2010.01.18 21:28:28 Error in master_ob->connect()

chaos

2010-01-18 15:38

reporter   ~0001685

1) Don't know; I haven't tried 3.3 for 32-bit. Almost my entire motivation for going to 3.3 is trying to go 64-bit so I can use more memory (because of another bug I reported I'm limited to 1 gig under 3.2; I'm hoping that will have fallen out of 3.3).
2) Sure, of course.
3) Heh, okay. Thanks. 3.5, you say? Anywhere I can go to read something about that?
4) That looks like a consequence of running ldmud.64bit bare instead of under mudloop.64bit. You should be able to prevent that by doing, from the lib.64bit directory, for f in lib/services/* lib/services.h; do : > $f; done

chaos

2010-01-18 23:35

reporter   ~0001687

Also, the lib doesn't depend on the db for authentication or anything, it still uses classic .o files for that, so login without the db is theoretically possible. It's likely that processes will try to talk to the db during the login sequence and bomb out, though. Anything that does that should be disable-able without negative consequence.

zesstra

2010-01-19 03:47

administrator   ~0001688

Last edited: 2010-01-19 03:51

@1: 3.2 and 3.3 can use more than 1GB of memory, no need for 64 bit architectures there. They can address more up to 4 GB on 32 bit architectures.

@2: yes, but you might want to enable the debug stuff on a routine basis, because it makes tracking bugs much more easy if it happens non-reproducibly.

@3: 3.5. is our development branch. There are no release and will be for some time. You can follow 3.5. by checking out our SVN repository (svn://svn.bearnip.com/ldmud/trunk ), but be aware: that is 'bleeding edge', it will probably compile, but other than that I make no promises. There were some plans in past announcements (e.g. http://mail63.csoft.net/pipermail/ldmud-talk/2008-July/000015.html ) but there other than the SVN repo (or maybe mantis itself) there is no solid public information about 3.5.x yet.

@4: well, I don't want to use your mudloop script, because it is too complex for a simple test and I won't execute it as root on my system. But later in the preload process it stumbles over the database stuff (e.g. def/descriptor/SQL.c line 198: Undefined function 'db_conv_string'. or mod/daemon/database.c) and the process never accepts a connection. However, I didn't let the process run for a long time, because it takes nearly 100% CPU load and fills my memory with hundreds of MB of your mudlib, which I can't afford on this machine. ;-)

chaos

2010-01-19 17:00

reporter   ~0001690

1) 3.2's compiler becomes unstable when more than 1GB is addressed, dropping function definitions and such. My hope was that if redesign work had been done on the driver with addressing a 64-bit memory space in mind, whatever little detail was confusing the compiler might have gone away.

2) I can't conceivably absorb the speed hit of enabling debug support in routine operations. I guess I misspoke slightly before, because I was also hoping for the speed benefits of getting out from under 32-bit emulation, in going to 64-bit. (I did some simplistic tests, and 32-bit emu seemed to carry a speed penalty of around 30%.)

3) Gotcha, thanks.

4) Heh, okay. A lot more stripped-down than that is called for, then. I'll see if I can make a minimal version that still produces the 0-ref-not-destructed errors over time (the segfaults on relogin hopefully won't be elusive).

zesstra

2010-01-24 09:09

administrator   ~0001693

3.3 and 3.2 differ quite a lot. I would suggest to try 3.3.x in 32 bit mode first, because 1GB is not an intrinsic limit in a 2^32 address space. It may well be that the problem vanished. Or that there are ways to track the problem if not.
Concerning speed differences: Mhmm, can't say much about this. But I maintain the opinion that 3.3.x compiled for 64 bit platforms is risky for a production/live mud. ;-)
But concerning the debug options malloc-trace and malloc-lpc-trace: I don't expect them to have a really big speed penalty, they mostly consume some additional bytes per memory block allocated.
(BTW: We might discuss such issues on the mailing list, because it has not much to do with this issue.)

zesstra

2011-02-23 21:37

administrator   ~0002026

Is there any new information available? Or the mentioned stripped-down testcase?

zesstra

2011-08-22 16:37

administrator   ~0002056

Since there is no further information which can help reproducing and/or locating the cause, I close this issue. If there is anything thing new, please re-open or tell me.

Issue History

Date Modified Username Field Change
2009-10-23 16:38 chaos New Issue
2009-10-24 03:51 zesstra Note Added: 0001548
2009-10-24 03:51 zesstra Status new => acknowledged
2009-10-25 20:09 chaos Note Added: 0001552
2009-10-26 03:28 zesstra Note Added: 0001553
2010-01-17 22:27 chaos Note Added: 0001677
2010-01-17 22:49 chaos Note Added: 0001678
2010-01-18 04:49 zesstra Note Added: 0001680
2010-01-18 13:33 chaos Note Added: 0001681
2010-01-18 14:22 zesstra Note Added: 0001683
2010-01-18 14:31 zesstra Note Added: 0001684
2010-01-18 15:38 chaos Note Added: 0001685
2010-01-18 23:35 chaos Note Added: 0001687
2010-01-19 03:47 zesstra Note Added: 0001688
2010-01-19 03:51 zesstra Note Edited: 0001688
2010-01-19 17:00 chaos Note Added: 0001690
2010-01-24 09:09 zesstra Note Added: 0001693
2011-02-23 21:37 zesstra Note Added: 0002026
2011-02-23 21:37 zesstra Status acknowledged => feedback
2011-02-23 22:02 zesstra Target Version => 3.3.721
2011-08-22 16:37 zesstra Note Added: 0002056
2011-08-22 16:37 zesstra Status feedback => closed
2011-08-22 16:37 zesstra Assigned To => zesstra
2011-08-22 16:37 zesstra Resolution open => unable to reproduce