discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] trouble with python sync_block and dynamic flow g


From: Mike Jameson
Subject: Re: [Discuss-gnuradio] trouble with python sync_block and dynamic flow graph reconfiguration
Date: Tue, 17 Sep 2013 11:17:23 +0100

Hi Joshua,

You will be pleased to know that it still works even after leaving it for 5 minutes:

address@hidden:~/Downloads$ ./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)
address@hidden:~/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.
address@hidden:~/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.

Regards,

Mike

--
Mike Jameson M0MIK BSc MIET
Ettus Research Technical Support
Email: address@hidden
Web: http://www.ettus.com


On Mon, Sep 16, 2013 at 11:16 PM, Joshua Lackey <address@hidden> wrote:
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



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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