Bug #790

babeltrace crash while reading 3 traces

Added by Francis Giraldeau about 6 years ago. Updated 5 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Reading a trace directory containing three traces makes babeltrace crash. Reading individual traces does not trigger the problem. The problem is reproducible with current master branch (up to commit 62f11f7472d3c). The trace is is added to the bug report. The GDB crash report is following.

[francis@berta babeltrace]$ libtool --mode=execute gdb ./converter/babeltrace 
GNU gdb (Ubuntu 7.7-0ubuntu3) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/francis/gitsrc/babeltrace/converter/.libs/lt-babeltrace...done.
(gdb) run /home/francis/lttng-traces/django-index > /dev/null
Starting program: /home/francis/gitsrc/babeltrace/converter/.libs/lt-babeltrace /home/francis/lttng-traces/django-index > /dev/null
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[error] Only CTF traces with a single clock description are supported by this babeltrace version.
[error] No clocks can be correlated and multiple traces are added to the collection. If you are certain those traces can be correlated, try using "--clock-force-correlate".
[warning] [Context] cannot open trace "/home/francis/lttng-traces/django-index/django-db/" from /home/francis/lttng-traces/django-index for reading.
[warning] errors occurred when opening trace "/home/francis/lttng-traces/django-index" for reading, continuing anyway.

*** Error in `/home/francis/gitsrc/babeltrace/converter/.libs/lt-babeltrace': free(): invalid pointer: 0x0000000000932760 ***

Program received signal SIGABRT, Aborted.
0x00007ffff64baf79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff64baf79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff64be388 in __GI_abort () at abort.c:89
#2  0x00007ffff64f81d4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff6606a10 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff65044ae in malloc_printerr (ptr=<optimized out>, str=0x7ffff6602b03 "free(): invalid pointer", action=1) at malloc.c:4996
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5  0x00007ffff6a86e3b in ?? () from /lib/x86_64-linux-gnu/
#6  0x00007ffff79b613c in ctf_destroy_metadata (trace=trace@entry=0x947040) at ctf-visitor-generate-io-struct.c:3131
#7  0x00007ffff799e70d in ctf_close_trace (tdp=0x947040) at ctf.c:2517
#8  0x00007ffff7bd13e7 in remove_trace_handle (handle=0xfa0e50) at context.c:235
#9  0x00007ffff6a9fc67 in ?? () from /lib/x86_64-linux-gnu/
#10 0x00007ffff6aa09a1 in g_hash_table_remove_all () from /lib/x86_64-linux-gnu/
#11 0x00007ffff6aa0a0e in g_hash_table_destroy () from /lib/x86_64-linux-gnu/
#12 0x00007ffff7bd17d1 in bt_context_destroy (ctx=0x60bab0) at context.c:201
#13 bt_context_put (ctx=0x60bab0) at context.c:222
#14 0x0000000000402946 in main (argc=<optimized out>, argv=<optimized out>) at babeltrace.c:792


django-index.tar.gz (1.43 MB) django-index.tar.gz Francis Giraldeau, 04/28/2014 02:03 PM
0001-Fix-invalid-pointer-free-with-trace-collection.patch (1.12 KB) 0001-Fix-invalid-pointer-free-with-trace-collection.patch Francis Giraldeau, 06/15/2015 11:43 AM

Also available in: Atom PDF