This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mtrace: Alloc duplicate


I am using mtrace to debug memory leaks in a program. I am getting
output of the following form from mtrace:

        + 0x00000000024097d0 Alloc 1219709 duplicate: 0x4b372b
/opt/orangefs/sbin/pvfs2-server:(dbpf_queued_op_alloc+0xe)[0x4b372b]

Reading the raw log it looks like the same pointer is allocated twice.
The program is multi-threaded, so I've thought about that as a reason.

There are some notes that mtrace(3) uses malloc_hook(3) and that
malloc_hook does not work well in a multithreaded environment. Is this
the cause of the problem? Does this output indicate a bug in my program
or just a problem with mtrace in multithreaded systems? The rest of the
output is still useful.

(I'm not on the list, please make sure I'm cc'd in any replies.)

- Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]