# Gr-osmosdr + airspy random issue

**URL:** <https://www.ruby-forum.com/t/gr-osmosdr-airspy-random-issue/233513>\
**Category:** GNU Radio\
**Created:** [December 20, 2014, 12:02pm UTC](https://www.ruby-forum.com/t/gr-osmosdr-airspy-random-issue/233513 "2014-12-20T12:02:55Z")\
**Posts on this page:** 3\
**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:** [December 20, 2014, 12:02pm UTC](https://www.ruby-forum.com/t/gr-osmosdr-airspy-random-issue/233513/1 "2014-12-20T12:02:55Z")

</div>

I use a airspy receiver with gr-osmosdr + gnuradio-companion.

Randomly, when I stop gnuradio execution, the following execution  
freezes at startup (my QT GUI instruments are not displayed).

And on the next start I have the following error message:

FATAL: Failed to open AirSpy device (-5) AIRSPY\_ERROR\_NOT\_FOUND

Everything goes back to operational state if I unplug/plug the airspy.

Looks like an improper airspy shutdown sequence when exiting gnuradio. I  
do not experience this kind of problem with other software using airspy.

I have tried to add missing “airspy\_exit()” at the end of  
“~airspy\_source\_c”, but that does not solve the problem.

Any clue to help me investigate this issue ?  
Thanks.

---

<div class="post-metadata">

**Author:** ![f1oat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@f1oat](https://www.ruby-forum.com/u/f1oat)\
**Post date:** [December 20, 2014, 1:14pm UTC](https://www.ruby-forum.com/t/gr-osmosdr-airspy-random-issue/233513/2 "2014-12-20T13:14:06Z")

</div>

Some progress here: “~airspy\_source\_c” destructor seems to being called  
when gnuradio is stopped.  
I have to learn how gnuradio implements exit to call proper airspy  
shutdown sequence.

---

<div class="post-metadata">

**Author:** ![f1oat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@f1oat](https://www.ruby-forum.com/u/f1oat)\
**Post date:** [December 20, 2014, 5:13pm UTC](https://www.ruby-forum.com/t/gr-osmosdr-airspy-random-issue/233513/3 "2014-12-20T17:13:26Z")

</div>

GRC uses SIGKILL to terminate the flow graph, so no destructor is  
called, and no sighandler can be binded.

Does anybody know how to modify this behavior of GRC ?
