discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] trouble with python sync_block and dynamic flow graph


From: Joshua Lackey
Subject: [Discuss-gnuradio] trouble with python sync_block and dynamic flow graph reconfiguration
Date: Mon, 16 Sep 2013 15:16:51 -0700

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.

Any ideas?
 

$ ./unconnect_test.py -h
Usage: unconnect_test.py: [options]

Options:
  -h, --help  show this help message and exit
  -f          Run failing test (with python sync_block) or passing test
              (without python sync_block)
$ ./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.
$ ./unconnect_test.py -f
my_sink: init 45187536
Running until enter is pressed: my_sink: work: 32768
my_sink: work: 32767
my_sink: work: 32768
my_sink: work: 32767 
 
Setting new sink.
my_sink: init 45187856
Unlocking... 
^Z
[1]+  Stopped                 ./unconnect_test.py -f
$ kill %1

[1]+  Stopped                 ./unconnect_test.py -f
$ fg
bash: fg: job has terminated
[1]+  Terminated              ./unconnect_test.py -f


Attachment: unconnect_test.py
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]