Segfault

Hi to all.
This is my first post here…i hope to have choosen the right place to
ask…

I’m currently trying to compile gqrx and gnuradio…everything went
well,
but when i run gqrx it won’t start and give me this error:

gqrx[5865]: segfault at 12d0 ip 00007f570ee76d2f sp 00007fff60fd9000
error
4 in libgnuradio-pmt-3.7.6git.so.0.0.0[7f570ee44000+50000]

I’ve asked on the gqrx group and the author (hi csete!!!) told me that
most probably it’s a bug/problem on gnuradio.

I’ve no idea what’s wrong…

PS: it was running ok before i updated with git pull gnuradio (didn’t do
that since 2 months…).

PSS: Sorry for my english!!!

Hi Michele,

if you built GNU Radio/gqrx with gcc, then the GNU Debugger might be of
immensive help.
First make sure you’ve built GNU Radio with debugging symbols (“cmake
-DCMAKE_BUILD_TYPE=RelWithDebInfo […]”), then start gqrx in the
debugger:

?> gdb $(which gqrx)
[lots of text from gdb]
(gdb) run []

should start gqrx and run until it segfaults. then use the backtrace
command in gdb:

(gdb) bt []

which should show you in which function call hierarchy the fault
occurred.

Greetings,
Marcus

PS: don’t worry about your English, it’s quite fine :slight_smile:

Il Sun, 30 Nov 2014 21:16:12 +0100, Marcus Müller ha scritto:

(gdb) run []
Marcus

gqrx[5865]: segfault at 12d0 ip 00007f570ee76d2f sp 00007fff60fd9000

PSS: Sorry for my english!!!


Discuss-gnuradio mailing list [email protected]
Discuss-gnuradio Info Page

the project uses qmake instead of cmake…but i’ve tryed anyway…
i get this from dbg:

Starting program: /home/michele/Scrivania/gqrx.git/build/gqrx
[Thread debugging using libthread_db enabled]
Using host libthread_db library
“/lib/x86_64-linux-gnu/libthread_db.so.1”.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) () from
/
usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
(gdb) bt
#0 0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) ()
from /usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#1 0x00007ffff6002079 in pmt::intern(std::string const&) () from /usr/
local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#2 0x00007fffee193a0d in ?? () from
/usr/lib/x86_64-linux-gnu/libgnuradio-
blocks.so.3.7.3
#3 0x00007ffff7dea13a in call_init (l=,
argc=argc@entry=1,
argv=argv@entry=0x7fffffffe078, env=env@entry=0x7fffffffe088) at dl-
init.c:78
#4 0x00007ffff7dea223 in call_init (env=,
argv=, argc=, l=) at dl-init.c:36
#5 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffe078,
env=0x7fffffffe088) at dl-init.c:126
#6 0x00007ffff7ddb24a in _dl_start_user () from /lib64/ld-linux-
x86-64.so.2
#7 0x0000000000000001 in ?? ()
#8 0x00007fffffffe38c in ?? ()
#9 0x0000000000000000 in ?? ()

Is this what you meant?

Is this what you meant?
Exactly!

So let’s have a look at the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) () from
/
usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
(gdb) bt
#0 0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) ()
from /usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#1 0x00007ffff6002079 in pmt::intern(std::string const&) () from /usr/
local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#2 0x00007fffee193a0d in ?? () from
/usr/lib/x86_64-linux-gnu/libgnuradio-
blocks.so.3.7.3

There’s one problem I see here: libgnuradio-blocks has version 3.7.3 and
libgnuradio-pmt 3.7.6. This means you’re mixing versions!
It’s still a funny point to segfault, but you’ll have to make sure not
to mix 3.7.3 and 3.7.6. From the way things are named
(pmt-3.7.6git.so.0.0.0 vs blocks.so.3.7.3) I’d assume that you have one
installation of GNU Radio that you’ve built yourself, and one that you
installed via your distribution’s package manager, maybe?

Greetings,
Marcus

THANKS!!!
Yes…i did have 2 installations…removed the ones from package manager
did the trick!

Hi Michele - It looks like there are multiple GNU Radio installs being
caught in the execution: /usr/local/lib/ and /usr/lib/x86_64-linux-gnu/
:

{{{
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) () from
/
usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
(gdb) bt
#0 0x00007ffff6001d2f in pmt::string_to_symbol(std::string const&) ()
from /usr/local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#1 0x00007ffff6002079 in pmt::intern(std::string const&) () from /usr/
local/lib/libgnuradio-pmt-3.7.6git.so.0.0.0
#2 0x00007fffee193a0d in ?? () from
/usr/lib/x86_64-linux-gnu/libgnuradio-
blocks.so.3.7.3
}}}

On Mac OS X this dual-linkage -could- cause issues depending on the
library linkage (flat or 2-level namespace; but, it likely would
anyway); I assume the same on Linux. I’d suggest limiting the number of
GR installs to just 1, and/or just making sure that any dependency is
linked to all of the correct GR libraries (those from the same install).

Good luck! - MLD