# Gqrx segfaults: rtlsdr\_read\_async returned with -5

**URL:** <https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964>\
**Category:** GNU Radio\
**Created:** [March 21, 2014, 5:21pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964 "2014-03-21T17:21:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 21, 2014, 5:21pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/1 "2014-03-21T17:21:48Z")

</div>

I have updated my gnuradio installation via pybombs today.  
Gqrx is no longer working with my RTL-SDR dongle. The gui loads, but the  
moment when I start the receiver it works for about a second and then it  
crashes with:  
rtlsdr\_read\_async returned with -5  
Segmentation fault (core dumped)

I tried different sample rates, but I cannot get it work. To be on the  
safe side I rebuilt gr-iqbal and gr-osmosdr and then gqrx, but that does  
not fix it. Other applications (gr-air-modes) work well with the new  
build and do not crash.

Here is a complete dump of a session:  
mark@orion:~/apps/gnuradio/3.7$ gqrx  
linux; GNU C++ version 4.6.3; Boost\_105300; UHD\_003.007.000-1-ga8caec5f

gr-osmosdr v0.1.0-78-g1e8b45d0 (0.1.1git) gnuradio  
v3.7.4git-35-g1092e685  
built-in source types: file osmosdr fcd rtl rtl\_tcp uhd hackrf rfspace  
airspy  
Using Volk machine: sse4\_a\_64\_orc  
gr-osmosdr v0.1.0-78-g1e8b45d0 (0.1.1git) gnuradio  
v3.7.4git-35-g1092e685  
built-in source types: file osmosdr fcd rtl rtl\_tcp uhd hackrf rfspace  
airspy  
Using device #0 Realtek RTL2838UHIDIR SN: 00000013  
Found Rafael Micro R820T tuner  
Exact sample rate is: 1500000.014901 Hz  
rtlsdr\_read\_async returned with -5  
Segmentation fault (core dumped)

tnx for any help,  
Mark

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 5:27pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/2 "2014-03-21T17:27:04Z")

</div>

On Fri, Mar 21, 2014 at 12:20 PM, M Dammer [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> build and do not crash.  
> built-in source types: file osmosdr fcd rtl rtl\_tcp uhd hackrf rfspace  
> airspy  
> Using device #0 Realtek RTL2838UHIDIR SN: 00000013  
> Found Rafael Micro R820T tuner  
> Exact sample rate is: 1500000.014901 Hz  
> rtlsdr\_read\_async returned with -5  
> Segmentation fault (core dumped)
> 
> tnx for any help,  
> Mark

Mark,

Updated from what previous version?

What’s your system (OS, processor)?

Tom

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 5:43pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/3 "2014-03-21T17:43:25Z")

</div>

I updated from a gnuradio 3.7.3 git version (before 3.7.3 was officially  
released). I updated the pybombs recipes via git before the update.  
“Pybombs update” removed all updateable gnuradio stuff and installed it  
new as expected.  
I can actually confirm the problem now on two machines. Both running  
XUbuntu 12.04 64bit. One with an Intel core 2 due and the other with an  
AMD “APU” processor. I usually had no problems running gnuradio, gqrx  
and other related applications on both machines.  
Can you explain what that rtlsdr\_read\_async… message means ?

Mark

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 5:46pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/4 "2014-03-21T17:46:55Z")

</div>

On 03/21/2014 12:41 PM, M Dammer wrote:

> Mark  
> That message is coming from the rtl-sdr driver code, which is seeing an  
> error return from a libusb read transaction. Which means there’s  
> something  
> wrong in the USB communications path between your PC and the dongle.

–  
Marcus L.  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 6:59pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/5 "2014-03-21T18:59:56Z")

</div>

I cannot see anything being wrong with USB. I tried different Kernels,  
different Dongles and they all fail. However booting my live DVD and  
starting gqrx (32bit) works.  
It looks like some incompatibility between the latest gqrx and my  
systems ☹

Mark

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 9:48pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/6 "2014-03-21T21:48:09Z")

</div>

This does not work. GQRX depends on gr-osmosdr and wont compile without  
it.

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 9:52pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/7 "2014-03-21T21:52:14Z")

</div>

Make sure you have the latest version of rtl-sdr library and gr-osmosdr.

There was a change somewhere and if you have one version more recent  
than the other, it can cause issue. So rebuild librtlsdr , then  
rebuild gr-osmosdr to use it, then rebuild gqrx.

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 7:09pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/8 "2014-03-21T19:09:17Z")

</div>

I remember having this issue as well on my computer. I think there is  
some  
incompatibility with running gqrx and having gr-osmosdr installed. What  
I  
did was simply uninstall gr-osmosdr to run gqrx then reinstall it when I  
need to use gnuradio with the rtlsdr source. I haven’t had time to debug  
further though.

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 22, 2014, 2:41pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/9 "2014-03-22T14:41:07Z")

</div>

Just updated everything and now both can coexist. I must’ve been running  
some old package somewhere.

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 21, 2014, 11:11pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/10 "2014-03-21T23:11:40Z")

</div>

On Fri, Mar 21, 2014 at 9:51 PM, Sylvain M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Make sure you have the latest version of rtl-sdr library and gr-osmosdr.
> 
> There was a change somewhere and if you have one version more recent  
> than the other, it can cause issue. So rebuild librtlsdr , then  
> rebuild gr-osmosdr to use it, then rebuild gqrx.

Indeed, I have just updated all my packages using pybombs and gqrx  
runs fine with rtlsdr.

Alex

---

<div class="post-metadata">

**Author:** ![M\_Dammer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@M\_Dammer](https://www.ruby-forum.com/u/M_Dammer)\
**Post date:** [March 23, 2014, 2:27pm UTC](https://www.ruby-forum.com/t/gqrx-segfaults-rtlsdr-read-async-returned-with-5/239964/11 "2014-03-23T14:27:21Z")

</div>

I updated and I still have the problem. Checking my syslog brought me to  
the following error:  
[7568.643970] gqrx[9018]: segfault at 7f82cb540ab8 ip 00007f7e89a1b646  
sp 00007f7e5affcc70 error 4 in libusb-1.0.so.0.1.0[7f7e89a12000+11000]  
and googling this brought me to the following Debian bug report where  
someone explicitly mentions a similar problem with a funcube dongle pro  
and qthid on Ubuntu 12.04 AMD64 systems:  
[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658136](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658136)  
Well, I think its time for the two yearly reinstall of the systems when  
the next LTS is coming out…

Mark
