Forum: GNU Radio Shared Memory Problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Trond D. (Guest)
on 2007-04-12 16:51
(Received via mailing list)
Hi,

I have a problem with insufficent shared memory. I'm running GNU Radio
from SVN, and keep getting these messages:

gr_vmcircbuf_sysv_shm: shmget (1): No space left on device
gr_buffer::allocate_buffer: failed to allocate buffer of size 32 KB
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc
Avbrutt (SIGABRT)

I've tried increasing the maximum size of shared mem blocks with this
command:
sysctl -w kernel.shmmax=2147483648

I've attached the block that causes these problems (it will not work
if you try it, because some additional modules are missing). Any hints
on how to solve this?
Greg T. (Guest)
on 2007-04-12 17:35
(Received via mailing list)
I have a problem with insufficent shared memory. I'm running GNU Radio
  from SVN, and keep getting these messages:

You didn't mention what operating system you are running, but it could
well be that you are hitting a limit on the number of segments rather
than the total size.

See the end of this page for setting shm limits to get the tests to
pass:

  http://gnuradio.org/trac/wiki/NetBSDInstall
Trond D. (Guest)
on 2007-04-12 17:57
(Received via mailing list)
2007/4/12, Greg T. <removed_email_address@domain.invalid>:
>   http://gnuradio.org/trac/wiki/NetBSDInstall
Ah, forgot to mention that :). I've tested on both Fedora Rawhide
(development) on my i386 laptop with 512 MB ram, and on Fedora Core 6
x86_64 that runs on an AMD 64 with 1 GB ram.

--
Trond D.
Eric B. (Guest)
on 2007-04-12 22:18
(Received via mailing list)
On Thu, Apr 12, 2007 at 02:50:17PM +0200, Trond D. wrote:
>
> I've tried increasing the maximum size of shared mem blocks with this
> command:
> sysctl -w kernel.shmmax=2147483648
>
> I've attached the block that causes these problems (it will not work
> if you try it, because some additional modules are missing). Any hints
> on how to solve this?

As Greg mentioned, this error is from shmget, and indicates
that there are not enough shared memory segments available.

Looks like kernel.shmmni may be the parameter that needs tweaking.
It's 4096 on my machines.

BTW, I like your use of lambda expressions below:

>         d( "s2v_input",
>             gr.stream_to_vector(gr.sizeof_gr_complex, self.fft_size))
>         d( "fft_input",
>             gr.fft_vcc(self.fft_size, True, self.window))

Eric
Trond D. (Guest)
on 2007-04-12 22:47
(Received via mailing list)
2007/4/12, Eric B. <removed_email_address@domain.invalid>:
> > Avbrutt (SIGABRT)
> that there are not enough shared memory segments available.
>
> Looks like kernel.shmmni may be the parameter that needs tweaking.
> It's 4096 on my machines.

Thanks for the answers! kernel.shmmni is the same as on my machines,
so I doubt that it is the problem . But I have already solved the
problem; Johnathan pointed me to the single pole IIR filter that
solved my problem in a much better way than the solution that I came
up with. Apparently GNU Radio does not like 2000 simultaneous branches
in a single block...

>
> BTW, I like your use of lambda expressions below:

Saves a lot of typing :)

> >         # Input signal; get Fourier transform of signal.
> >         d( "s2v_input",
> >             gr.stream_to_vector(gr.sizeof_gr_complex, self.fft_size))
> >         d( "fft_input",
> >             gr.fft_vcc(self.fft_size, True, self.window))
>
> Eric
>


--
Trond D.
Johnathan C. (Guest)
on 2007-04-12 22:57
(Received via mailing list)
Trond D. wrote:

>> BTW, I like your use of lambda expressions below:
>
> Saves a lot of typing :)

Too bad they won't be necessary soon :-)

The hier_block2 stuff is undergoing major surgery and won't be using the
'define_component, connect' techniques anymore, it will instead look
very much like how the gr.flow_graph() stuff works today.  I'll send a
note out to the list when this done, but before I merge into the trunk.
Since this is all unannounced and undocumented, I expect only a few
developers to be impacted.

--
Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com
This topic is locked and can not be replied to.