[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] message queues - Inconsistent data problem
From: |
Jérôme Nokin |
Subject: |
Re: [Discuss-gnuradio] message queues - Inconsistent data problem |
Date: |
Wed, 2 Jul 2014 09:33:11 +0200 |
Hello again,
My python code is actually inspired from "Packet Encoder" block
(/path/to/gnuradio/.../grc_gnuradio/blks2/packet.py) were I suffer
from the same issue.
I wrote that python script to make it very simple/short and confirm
the troubles.
I would be honored if someone could get a try on it to confirm whether
or not it is reproducible.
I'm wondering if the bug is in GnuRadio or between the chair and the screen..
Thank you very much !
Jerome
2014-06-29 16:08 GMT+02:00 Jérôme Nokin <address@hidden>:
> Hello,
>
>
> I'm using Gnuradio version: v3.7.2.1-62 and am facing a strange issue
> with message queuing.
>
> I wrote a testing "hier" block which holds 2 message blocks (source + sink).
>
> ---------------
> #create blocks
> msgq_in = gr.msg_queue(2)
> msgq_out = gr.msg_queue(2)
> msg_sink = blocks.message_sink(gr.sizeof_char, msgq_in, False)
> msg_source = blocks.message_source(gr.sizeof_char, msgq_out)
>
> #connect
> self.connect(self, msg_sink)
> self.connect(msg_source, self)
> ---------------
>
>
> The hier block run a thread which read messages from the message_sink
> and send them to message_source. Nothing more.
> The final flow graph is "File source" -> "Hier block" -> "File Sink"
>
> The full python code is here:
> http://pastebin.com/AfFhEGQ6
>
> The problem:
>
> /tmp/source contains "abcdefghijklmnopqrstuvwxz0123456789" + new line:
>
> $ hexdump -C /tmp/source
> 00000000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 |abcdefghijklmnop|
> 00000010 71 72 73 74 75 76 77 78 7a 30 31 32 33 34 35 36 |qrstuvwxz0123456|
> 00000020 37 38 39 0a |789.|
>
> When I run the Gnuradio script for a few seconds, I expect to found
> the following in /tmp/sink:
>
> $ head /tmp/sink
> abcdefghijklmnopqrstuvwxz0123456789
> abcdefghijklmnopqrstuvwxz0123456789
> abcdefghijklmnopqrstuvwxz0123456789
> abcdefghijklmnopqrstuvwxz0123456789
> abcdefghijklmnopqrstuvwxz0123456789
> [...]
>
> However, from time to time, bytes are missing:
>
> $ grep -v abcdefghijklmnopqrstuvwxz0123456789 /tmp/sink
> abcdefghijklmnopqrstuvwxz012qrstuvwxz0123456789
> abcdeqrstuvwxz0123456789
> abcklmnopqrstuvwxz0123456789
> abcdefghijklmnopqrstuvwxz01234stuvwxz0123456789
> abcdefghijklmnopqrstuvwx
>
>
> Am I doing something wrong ?
>
> Thank you very much for your feedback.
>
> Regards,
> Jerome
- Re: [Discuss-gnuradio] message queues - Inconsistent data problem,
Jérôme Nokin <=