gqrx crashes at exit, how to debug this?

991 views
Skip to first unread message

wofritzyt

unread,
Jul 14, 2016, 6:47:47 AM7/14/16
to Gqrx SDR
Hello,

I've got some time to play with gqrx, so I'll try to work on some issues I found while using the program (and I am using it really often, because it is the second receiver in my amateur radio station).

First issue: I always get a memory crash dump on program exit:

 ** Error in `src/gqrx': corrupted double-linked list: 0x0000000000efd580 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fee0fbc1725]
/lib/x86_64-linux-gnu/libc.so.6(+0x7e783)[0x7fee0fbc8783]
/lib/x86_64-linux-gnu/libc.so.6(+0x801e8)[0x7fee0fbca1e8]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fee0fbcdabc]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x298529)[0x7fee10a4c529]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7fee0fb8435a]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x7bda3)[0x7fee1082fda3]

This is on Ubuntu 16.04, but it was alos happening with Ubuntu 14.04.

Is this a known problem, or better, did anyone see this too?
What would be the best strategy to tackle this issue?
How do I create a debug build with cmake?
Anyone tried Valgrind with gqrx?

Regards,
Wolf, DK7OB

Alexandru Csete

unread,
Jul 14, 2016, 3:03:29 PM7/14/16
to gq...@googlegroups.com
On Thu, Jul 14, 2016 at 12:47 PM, wofritzyt <wolfgan...@gmx.net> wrote:
> Hello,
>
> I've got some time to play with gqrx, so I'll try to work on some issues I
> found while using the program (and I am using it really often, because it is
> the second receiver in my amateur radio station).
>
> First issue: I always get a memory crash dump on program exit:
>
> ** Error in `src/gqrx': corrupted double-linked list: 0x0000000000efd580
> ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fee0fbc1725]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7e783)[0x7fee0fbc8783]
> /lib/x86_64-linux-gnu/libc.so.6(+0x801e8)[0x7fee0fbca1e8]
> /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fee0fbcdabc]
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x298529)[0x7fee10a4c529]
> /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7fee0fb8435a]
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x7bda3)[0x7fee1082fda3]
>
> This is on Ubuntu 16.04, but it was alos happening with Ubuntu 14.04.
>
> Is this a known problem, or better, did anyone see this too?

I haven't seen such error for a long time, so I am wondering if it
could be occurring inside Qt? I am usually using the latest version of
Qt installed in custom directory.

> What would be the best strategy to tackle this issue?
> How do I create a debug build with cmake?

Add -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo to build binary with
debug symbols included, then run gqrx through gdb, i.e.

$ gdb src/gqrx

When it crashes you can type "bt" or "backtrace" in the gdb console to
get a trace of the function calls leading to the crash.

Alex

Wolfgang Fritz

unread,
Jul 15, 2016, 3:41:19 AM7/15/16
to gq...@googlegroups.com
Am 14.07.2016 um 21:03 schrieb Alexandru Csete:

>
> I haven't seen such error for a long time, so I am wondering if it
> could be occurring inside Qt? I am usually using the latest version of
> Qt installed in custom directory.
>
>> What would be the best strategy to tackle this issue?
>> How do I create a debug build with cmake?
>
> Add -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo to build binary with
> debug symbols included, then run gqrx through gdb, i.e.
>
> $ gdb src/gqrx
>
> When it crashes you can type "bt" or "backtrace" in the gdb console to
> get a trace of the function calls leading to the crash.
>
> Alex
>

Thank you Alex, I got a back trace but I am not sure how to interpret
it. For me it looks like the crash origins in gnuradio lib, but it is
quite obfuscated (at least for me) with C++ STL related traces.

This is the trace:
Thread 1 "gqrx" received signal SIGABRT, Aborted.
0x00007ffff406f418 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht
gefunden.
(gdb) bt
#0 0x00007ffff406f418 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff407101a in __GI_abort () at abort.c:89
#2 0x00007ffff40b172a in __libc_message (do_abort=2,
fmt=fmt@entry=0x7ffff41ca6b0 "*** Error in `%s': %s: 0x%s ***\n") at
../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff40ba679 in malloc_printerr (ar_ptr=0x7ffff43fdb20
<main_arena>, ptr=<optimized out>, str=0x7ffff41c7472 "corrupted
double-linked list", action=3)
at malloc.c:5007
#4 _int_free (av=0x7ffff43fdb20 <main_arena>, p=<optimized out>,
have_lock=0) at malloc.c:4015
#5 0x00007ffff40bdabc in __GI___libc_free (mem=<optimized out>) at
malloc.c:2969
#6 0x00007ffff76c2925 in std::_Rb_tree<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::pair<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const, std::map<long, gr::basic_block*,
std::less<long>, std::allocator<std::pair<long const, gr::basic_block*>
> > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const, std::map<long,
gr::basic_block*, std::less<long>, std::allocator<std::pair<long const,
gr::basic_block*> > > > >, std::less<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::allocator<std::pair<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const, std::map<long,
gr::basic_block*, std::less<long>, std::allocator<std::pair<long const,
gr::basic_block*> > > > >
>::_M_erase(std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<long, gr::basic_block*, std::less<long>, std::allocator<std::pair<long const, gr::basic_block*> > > > >*) () from /usr/local/lib/libgnuradio-runtime-3.7.11git.so.0.0.0
#7 0x00007ffff76c29b0 in gr::block_registry::~block_registry() () from
/usr/local/lib/libgnuradio-runtime-3.7.11git.so.0.0.0
#8 0x00007ffff407435a in __cxa_finalize (d=0x7ffff26b0568) at
cxa_finalize.c:56
#9 0x00007ffff23e1513 in __do_global_dtors_aux () from
/usr/local/lib/libgnuradio-runtime-3.7.10git.so.0.0.0
#10 0x00007fffffffdd70 in ?? ()
#11 0x00007ffff7de7c17 in _dl_fini () at dl-fini.c:235
Backtrace stopped: frame did not save the PC
(gdb)

I'll try to build gnuradio with debug info and hope to get a more
detailed trace then (with line numbers).

This is not a critical issue since it only happens at program exit.

Regards,
Wolf, DK7OB

wofritzyt

unread,
Aug 1, 2016, 11:28:22 AM8/1/16
to Gqrx SDR
Update:

I looked into this today, and it turned out to be the classical error: I had 2 versions of the gnu radio packages installed on my system and had built the gr-osmosdr against the wrong one. I have now removed the precompiled gnuradio, rebuilt gr-osmosdr and the crash is gone.

I found this with valgrind, because valgrind provided better stack traces than the glibc.


Reply all
Reply to author
Forward
0 new messages