I can’t get dynamic reconfiguration to work when my flow graph has a
sync_block implemented in Python. If I lock() and then disconnect() and
connect() other blocks, my program always hangs on the unlock(). It
won’t
even stop when I hit ctrl-c. Superficial debugging shows that a thread
is
stuck on a sem_wait() somewhere. Figuring out exactly where it is would
take me quite some time as I’m not familiar with that section of the GNU
Radio code. (Considering I wrote the sync_block in Python to save some
time, re-implementing it in C++ would be quicker for me than tracking
down
this potential bug.)
I did search the mailing list, but I couldn’t find anyone discussing
this
issue. At least not with the search terms I used.
I realize that it is entirely possible I’m simply doing it wrong so I
wrote
a (minimal) example that demonstrates my problem. (Attached.)
I should include information about my GNU Radio install, but I’m not
sure
what would be useful. I use Arch Linux and can’t run the build-gnuradio
script directly, but I followed it as an example. I wanted to get 3.7
so I
installed from the git master branch. The last commit in my repo is
be73b3035c184cf09e1051deaba20eca88de8c9d . If any other information
about
my system would be useful in tracking this down, please tell me.
Here is an example run of the attached program. Note how the first test
using all GNU Radio C++ primitives works as expected. The example only
hangs when I try and lock()/unlock() the flow graph that contains my
simple
Python sync_block.
Options:
-h, --help show this help message and exit
-f Run failing test (with python sync_block) or passing test
(without python sync_block)
m@mi7:~/Downloads$ ./unconnect_test.py
Running until enter is pressed:
Setting new sink.
Unlocking…
Using Volk machine: avx_64_mmx_orc
Unlocked
Hit Enter to quit:
Finished.
m@mi7:~/Downloads$ ./unconnect_test.py -f
my_sink: init 60067920
Running until enter is pressed: my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
<----snip---->
I’ve just looked at the git log and I am also using the same version as
you:
commit be73b3035c184cf09e1051deaba20eca88de8c9d
I am using Ubuntu 12.04 LTS x64 with a Quad Core i7/8GB Ram and GNU
Radio/UHD was built with pybombs.
While it seems to work just fine in the simple example, my more
complicated
program locked up after a few stop()/start()s. I decided that tracking
the
problem with the temporary fix would be just as difficult. (And
ultimately
pointless when the problem with lock()/unlock() is figured out.)
I’m re-implementing in C++ now so please don’t feel any bug-fix pressure
from me. I’m interested to hear the root cause though when you figure
it
out.
Could you enter this as an issue in our ticket system? You’ll have to
register an account and let us know so we can manually set your ability
to
create issues. But I’d like this to at least be documented so when we
have
time we can go back and work on this.
Thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.