discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] symbol already exists: cannot reuse! runtime erro


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] symbol already exists: cannot reuse! runtime error
Date: Wed, 7 Jun 2017 23:22:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

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
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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