Interesting memory corruption exhibited in test-query.

Derek Atkins warlord at MIT.EDU
Mon May 24 23:45:57 EDT 2004


Hi,

I've noticed some intermittent memory corruption in HEAD (and g2).
It's not 100% reproducible, but does seem to occur about 25% of the
time in my body of personal tests.  In particular, test-query seems to
fail.  I tried running under gdb and this is what I got.
Unfortunately running with electric fence doesn't seem to elicit
anything useful (due to a bug in my version of ltdl).

Has anyone else noticed this behavior?  Interestingly it DOES always
fail in the same place...

-derek

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1075851616 (LWP 2657)]
0x4207a8a3 in strlen () from /lib/tls/libc.so.6
(gdb) where
#0  0x4207a8a3 in strlen () from /lib/tls/libc.so.6
#1  0x400c7fcd in g_strconcat (string1=0x80c49e0 "") at gstrfuncs.c:193
#2  0x4003a377 in xaccScrubUtilityGetOrMakeAccount (root=0x80c49e0, 
    currency=0x80c7750, name_root=0x4006bfe3 "Imbalance") at Scrub.c:788
#3  0x40039837 in xaccTransScrubImbalance (trans=0x80db878, root=0x80c49e0, 
    parent=0x0) at Scrub.c:349
#4  0x4003f1bc in xaccTransCommitEdit (trans=0x80db878) at Transaction.c:1575
#5  0x4002dfd6 in xaccAccountCommitEdit (acc=0x80c4e90) at Account.c:365
#6  0x4002e10c in xaccAccountDestroy (acc=0xe2031810) at Account.c:399
#7  0x40033c51 in xaccFreeAccountGroup (grp=0x80c49e0) at Group.c:301
#8  0x40033be9 in xaccAccountGroupDestroy (grp=0x80c49e0) at Group.c:255
#9  0x4003384f in xaccCollSetAccountGroup (col=0x80c49f8, grp=0x0)
    at Group.c:106
#10 0x40033915 in xaccSetAccountGroup (book=0xbfffe9e8, grp=0x0) at Group.c:131
#11 0x40034bf9 in group_book_end (book=0x80b3138) at Group.c:1246
#12 0x40061342 in qof_object_book_end (book=0x80b3138) at qofobject.c:86
#13 0x4005ff88 in qof_book_destroy (book=0x80b3138) at qofbook.c:109
#14 0x40068bdd in qof_session_destroy (session=0x80b38d0) at qofsession.c:767
#15 0x0804b286 in run_test () at test-query.c:63
#16 0x0804b2b8 in main_helper (closure=0x0, argc=1, argv=0xbfffed84)
    at test-query.c:75
#17 0x4011cd4f in scm_init_guile () from /usr/lib/libguile.so.12
#18 0x4011cd0e in scm_init_guile () from /usr/lib/libguile.so.12
#19 0x4011c9e0 in scm_boot_guile () from /usr/lib/libguile.so.12
#20 0x0804b2fb in main (argc=1, argv=0xbfffed84) at test-query.c:86
#21 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
(gdb) up
#1  0x400c7fcd in g_strconcat (string1=0x80c49e0 "") at gstrfuncs.c:193
193     gstrfuncs.c: No such file or directory.
        in gstrfuncs.c
(gdb) up
#2  0x4003a377 in xaccScrubUtilityGetOrMakeAccount (root=0x80c49e0, 
    currency=0x80c7750, name_root=0x4006bfe3 "Imbalance") at Scrub.c:788
788       accname = g_strconcat (name_root, "-",
(gdb) p *currency
$1 = {fullname = 0x80e9a30 "", namespace = 0x869fe412 "", 
  mnemonic = 0xe2031810 <Address 0xe2031810 out of bounds>, 
  printname = 0xac327e2b "", exchange_code = 0x9703a768 "", 
  fraction = 1867401420, unique_name = 0x5cb073c6 "", mark = -7471, 
  quote_flag = -1126258203, quote_source = 0xec9d228a, 
  quote_tz = 0x99a95f8b ""}
(gdb) up
#3  0x40039837 in xaccTransScrubImbalance (trans=0x80db878, root=0x80c49e0, 
    parent=0x0) at Scrub.c:349
349         account = xaccScrubUtilityGetOrMakeAccount (root, 
(gdb) p *trans
$2 = {inst = {entity = {e_type = 0x80ccb98 "Trans", guid = {
        data = "\036=<\234tä¢oÔÅ\023é\n\201|ÿ", __align_me = -1673773794}, 
      collection = 0x80ccb70}, book = 0x80b3138, kvp_data = 0x80dbdd8, 
    editlevel = 1, do_free = 0, dirty = 1}, date_entered = {
    tv_sec = 1140936577, tv_nsec = 1693015346}, date_posted = {
    tv_sec = 1930619626, tv_nsec = 1515752155}, 
  num = 0x80df358 "@O\\D at j'|*U8L9J[#.=!vO33L'-{\n4\ns^IeuidAla/*P7X-hXt%9VJ]7FK5ujX2K\nwQgfNQ`9~OyK(<)][q[Qb*#b\tg`h}X6l(P(/yul>gGX'fA2}b$p4BsXhKXJw!j)/'I_!ANIU3no|&GGaqC4NQ_##SOP\\]@q.x?xn~xD]kE(83`f=ijG5?'%euqLj|bI]vwe0Ap(u"..., 
  description = 0x80df108 "$5~b0#?NkI^^!8-k", common_currency = 0x80c7750, 
  version = 0, version_check = 0, splits = 0x80cc600, marker = 42 '*', 
  orig = 0x80ca490, idata = 0}
(gdb) quit

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list