# Segfault

**URL:** <https://www.ruby-forum.com/t/segfault/233270>\
**Category:** GNU Radio\
**Created:** [November 29, 2014, 7:36pm UTC](https://www.ruby-forum.com/t/segfault/233270 "2014-11-29T19:36:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 29, 2014, 7:36pm UTC](https://www.ruby-forum.com/t/segfault/233270/1 "2014-11-29T19:36:51Z")

</div>

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!!!

---

<div class="post-metadata">

**Author:** ![michele](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://www.ruby-forum.com/u/michele)\
**Post date:** [November 30, 2014, 9:17pm UTC](https://www.ruby-forum.com/t/segfault/233270/2 "2014-11-30T21:17:45Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![michele](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://www.ruby-forum.com/u/michele)\
**Post date:** [December 1, 2014, 2:14pm UTC](https://www.ruby-forum.com/t/segfault/233270/3 "2014-12-01T14:14:41Z")

</div>

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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

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?

---

<div class="post-metadata">

**Author:** ![michele](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://www.ruby-forum.com/u/michele)\
**Post date:** [December 1, 2014, 3:02pm UTC](https://www.ruby-forum.com/t/segfault/233270/4 "2014-12-01T15:02:01Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![michele](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://www.ruby-forum.com/u/michele)\
**Post date:** [December 1, 2014, 8:52pm UTC](https://www.ruby-forum.com/t/segfault/233270/5 "2014-12-01T20:52:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michele](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@michele](https://www.ruby-forum.com/u/michele)\
**Post date:** [December 1, 2014, 2:55pm UTC](https://www.ruby-forum.com/t/segfault/233270/6 "2014-12-01T14:55:20Z")

</div>

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
