Hi Eugene,

uh-oh. The Global Block Registry is definitely not one of the most
modern parts of GNU Radio; personally, I'd argue, it shouldn't exist,
but meh, GNU Radio is a naturally grown project, so we need to rely on
it. Plus I haven't found the time to get rid of it (but neither have I
found good arguments for keeping it).

Basically, it's very surprising this happens; basically, this should
only happen if you have as many blocks of the same name as "long" can
hold – and that's more than you should be able to keep in memory on your
system. So, my common sense tells me this is a GNU Radio bug, and I've
never seen it before, so, consider yourself a discoverer. Sorry.

What happens is that `long block_registry::register_block(basic_block*)`
is called to count the blocks of the same name, giving the first one the
number 0, the second 1, …; these numbers are then used to build
"blockname0", "blockname1" and so on as "symbolic_name" for the global
block. That should work. Of course, it's a buggy design, being
non-threadsafe and everything. So, maybe your problem can be explained
by concurrent instantiation of basic_blocks or top_blocks?

Another option I can immediately think of is that you set clashing block
aliases. Is that possible? I'm a bit tired, but maybe you can get
smarter than I'm right now by adding either debug prints to
block_registry.cc, or by having something like the following in GDB:

break gr::block_registry::register_symbolic_name(gr::basic_block* ,
std::string)
begin
print name ## or whatever magic you need to do in GDB to print
std::string, but I think it should work
cont
end

Best regards,
Marcus
On 07.06.2017 03:08, Eugene Grayver wrote:
>
> I have a rather complicated GR application.  I create (Python, w/out
> grc) multiple top_blocks, each containing dozens of blocks.  To make
> things even more complicated, the flowgraphs are created in stages –
> using runtime reconfiguration to add more blocks. 
>
>  
>
> Everything works fine until I reach some critical size (apparently). 
> Then I get an error: ‘symbol already exists cannot reuse’  It has
> something to do with registering a block name in
> ‘block_registry::register_symbolic_name’
>
>  
>
> I experience this error with both versions 3.7.9.2 and 3.7.11.
>
>  
>
> I am at a loss on how to debug this problem.  Reviewing the code seems
> OK – the thread locks look good.  I have no idea how a block with the
> same name can show up twice.  Is this due to multiple top_block
> instances?  Due to runtime reconfig? 
>
>  
>
> Ideas?
>
>  
>
> _______________________
> Eugene Grayver, Ph.D.
> Aerospace Corp., Sr. Eng. Spec.
> Tel: 310.336.1274
> ________________________
>
>  
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

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

Reply via email to