public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/6694] New: auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop)
@ 2008-06-25 19:28 mwielaard at redhat dot com
  2008-06-25 20:04 ` [Bug translator/6694] " fche at redhat dot com
  2008-06-30 10:42 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mwielaard at redhat dot com @ 2008-06-25 19:28 UTC (permalink / raw)
  To: systemtap

Since the following commit there seems to be a malloc/free issue with
testsuite/systemtap.base/stmt_rel.exp:


commit 2e67a43b11d5b44f962f1c6a0ad89d96e5645a44
Author: Tim Moore <moore@blackbox.bricoworks.com>
Date:   Tue Jun 24 14:26:52 2008 +0200

    Cleanup in tapsets.cxx


Running /home/mark/src/systemtap/testsuite/systemtap.base/stmt_rel.exp ...
*** glibc detected *** stap: double free or corruption (fasttop):
0x00002aaab5c90d80 ***
======= Backtrace: =========
stap[0x2aaaaab722ea]
[... lots more ...]
FAIL...

You can replicate it by hand with:
./stap testsuite/systemtap.base/stmt_rel.stp

Running with export MALLOC_CHECK_=3 under gdb gives:
 
Program received signal SIGABRT, Aborted.
[Switching to Thread 46912524253104 (LWP 9937)]
0x00002aaaabc24ec5 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Current language:  auto; currently c
(gdb) bt
#0  0x00002aaaabc24ec5 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00002aaaabc26970 in abort () at abort.c:88
#2  0x00002aaaabc5f0db in __libc_message (do_abort=2, 
    fmt=0x2aaaabd16f08 "*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#3  0x00002aaaabc6a775 in free_check (mem=0x2aaab5c8c990, 
    caller=<value optimized out>) at malloc.c:5891
#4  0x00002aaaabc69ec7 in __libc_free (mem=0x6) at malloc.c:3590
#5  0x00002aaaaab722ea in dwflpp::iterate_over_srcfile_lines (
    this=0x2aaaacf43a40, srcfile=0x2aaab5206320 "fs/bio.c", 
    lines=0x7fffdef4dcb4, need_single_match=true, line_type=WILDCARD, 
    callback=0x2aaaaab4f650 <query_srcfile_line>, data=0x7fffdef4db30)
    at auto_free.h:22
[...]

-- 
           Summary: auto_free seems to trigger *** glibc detected *** stap:
                    double free or corruption (fasttop)
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: mwielaard at redhat dot com
                CC: timoore at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6694

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/6694] auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop)
  2008-06-25 19:28 [Bug translator/6694] New: auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop) mwielaard at redhat dot com
@ 2008-06-25 20:04 ` fche at redhat dot com
  2008-06-30 10:42 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2008-06-25 20:04 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2008-06-25 12:45 -------
As a matter of policy, systemtap core has allowed itself to keep its own
allocated C/C++ heap memory objects alive, without explicit free()s.  This
is because the (programming) effort required to properly garbage-collect
everything far exceeds the benefit of saving a few megabytes of
user-space memory.  I advise that auto_free{} and similar efforts be taken
out, and that explicit free()s only be done if known to be absolutely safe.

(Elfutils-allocated memory *is* freed, since it is large and fairly
easy to clean up.)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6694

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/6694] auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop)
  2008-06-25 19:28 [Bug translator/6694] New: auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop) mwielaard at redhat dot com
  2008-06-25 20:04 ` [Bug translator/6694] " fche at redhat dot com
@ 2008-06-30 10:42 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2008-06-30 10:42 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2008-06-29 18:45 -------
Tim, please work with Mark to find out whether there is some
reason to suspect Mark's build.  If there is any doubt at all
in the auto_free code, please roll it back.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|timoore at redhat dot com   |fche at redhat dot com
         AssignedTo|systemtap at sources dot    |timoore at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=6694

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-29 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-25 19:28 [Bug translator/6694] New: auto_free seems to trigger *** glibc detected *** stap: double free or corruption (fasttop) mwielaard at redhat dot com
2008-06-25 20:04 ` [Bug translator/6694] " fche at redhat dot com
2008-06-30 10:42 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).