0

I'm working with GNURadio, and working with stream tags (using stream tagging to create a burst transmitter), but my flowgraph won't run with around ~200 stream tags, citing error below.

gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::buffer::allocate_buffer: failed to allocate buffer of size 1250000 KB
gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::vmcircbuf_sysv_shm: shmget (1): Invalid argument
gr::buffer::allocate_buffer: failed to allocate buffer of size 1250000 KB
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

However, sysctl --all | grep shm outputs

kernel.shm_next_id = -1
kernel.shm_rmid_forced = 0
kernel.shmall = 32147483648
kernel.shmmax = 32147483648
kernel.shmmni = 16777216

This means I should have 32 GB in shared memory, correct? I set kernel.shmall and shmmax via

sudo sysctl kernel.shmall=32147483648
sudo sysctl kernel.shmmax=32147483648

The only thing that concerns me is cat /proc/meminfo | grep shmem returns

Shmem:             42556 kB

Is there a better way to increase shared memory?

  • Stream tags are unrelated to this problem. The interesting part is that you have a buffer with items of a such a strange size that the smallest possible buffer size is 1.25 GB. – Marcus Müller Jun 16 '17 at 15:15
  • @Marcus I'm using an adapted version of the freq_hopping.py example, and I make n_bursts to be 100 with a certain duty cycle (where length_burst = int(duty_cycle/100.0 * samp_rate) ). Duty cycle at 10% and 50% works, but when I change duty cycle to be 80%, I get the above error. I created the massive buffer size as a last ditch for fixing the issue. Thanks for looking into this. EDIT: I should say: @ 100 bursts: 10% and 50% duty cycle work, 80% does not. @ 1000 bursts: none of the above work. – triscuit312 Jun 16 '17 at 15:52
  • @MarcusMüller Not sure if I tagged you correctly. – triscuit312 Jun 19 '17 at 17:58

0 Answers0