Re: [Discuss-gnuradio] buffer allocation failing with RuntimeError: bad_alloc

2019-11-23 Thread Bastian Bloessl
AFAIS, there are two parameters for shared memory: shmmax and shmall.
The first sets the maximum size for a single segment, the latter the
total available shared memory (in number of pages).

You could try to increase shmall as well.

Best,
Bastian

On 11/21/19 11:58 AM, Eamon Heaney wrote:
> Yeah, I tried changing the maximum shared memory, but that didn't work.
> I mean, it didn't resolve the problem; I gave it 2147483648 but the
> error persists. I tried adding a zero to that, but that's an "Invalid
> Argument."
> 
> On Thu, Nov 21, 2019 at 5:17 AM Ron Economos  > wrote:
> 
> You must be running an older kernel that doesn't set kernel.shmmax
> to some large value.
> 
> To check the current setting:
> 
> sysctl kernel.shmmax
> 
> To set it higher:
> 
> sudo -w kernel.shmmax=2147483648
> 
> Ron
> 
> On 11/21/19 01:59, Eamon Heaney wrote:
>> I'm running the sample wifi_tx.grc flowchart from gr-ieee802.11,
>> substituting a null sink for the USRP sink to test it.
>>
>> When I try to run it, it fails with the following error message:
>> "
>> >set_min_output_buffer on block 7 to 207744
>> >set_min_output_buffer on block 9 to 2077440
>> >set_min_output_buffer on block 11 to 2077440
>> >set_min_output_buffer on block 12 to 207744
>> >set_min_output_buffer on block 13 to 415488
>> >set_min_output_buffer on block 14 to 207744
>> >set_min_output_buffer on block 26 to 262144
>> >set_min_output_buffer on block 27 to 96000
>> >set_min_output_buffer on block 31 to 10
>> >gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>> >gr::buffer::allocate_buffer: failed to allocate buffer of size
>> 1038720 KB
>> >gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>> >gr::buffer::allocate_buffer: failed to allocate buffer of size
>> 1038720 KB
>> >Traceback (most recent call last):
>> >  File "/home/vtti/working/wifi_tx.py", line 297, in 
>> >    main()
>> >  File "/home/vtti/working/wifi_tx.py", line 276, in main
>> >    tb.start()
>> >  File
>> "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/top_block.py",
>> line 111, >in start
>> >    top_block_start_unlocked(self._impl, max_noutput_items)
>> >  File
>> "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/runtime_swig.py",
>> line >5828, in top_block_start_unlocked
>> >    return _runtime_swig.top_block_start_unlocked(r,
>> max_noutput_items)
>> >RuntimeError: std::bad_alloc
>> "
>> Here's a picture of my flowchart:
>> gnuradio-runtimeError-bad_alloc.png
>>
>> Tested this on a different machine, and it works fine, so the
>> problem isn't with the flowchart itself. I'm working off the
>> maint-3.8 branch, installed from source.
>>
>> Any idea why I'm getting this error, or how I could resolve it?
>> Thanks!
>> -- 
>> Eamon Heaney
>> /
>> /Fleet Commander/
>> //
>> /President, Model UN at Virginia Tech/
>> /
> 
> 
> 
> -- 
> Eamon Heaney
> /
> /Fleet Commander/
> //
> /President, Model UN at Virginia Tech/
> /

-- 
Dr. Bastian Bloessl
Secure Mobile Networking Lab (SEEMOO)
TU Darmstadt, Germany

www.bastibl.net
GitHub/Twitter: @bastibl



Re: [Discuss-gnuradio] buffer allocation failing with RuntimeError: bad_alloc

2019-11-22 Thread Eamon Heaney
Still gives the same error message, only with ">gr::vmcircbuf_mmap_tmpfile:
mmap (1): Cannot allocate memory" instead of "
>gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory."



On Thu, Nov 21, 2019 at 1:36 PM Philip Balister  wrote:

> Look in
>
> ${HOME}/.gnuradio/prefs/vmcircbuf_default_factory
>
> and see what is there and maybe change to this:
>
> gr::vmcircbuf_mmap_tmpfile_factory
>
> Philip
>
>
> On 11/21/19 4:59 AM, Eamon Heaney wrote:
> > I'm running the sample wifi_tx.grc flowchart from gr-ieee802.11,
> > substituting a null sink for the USRP sink to test it.
> >
> > When I try to run it, it fails with the following error message:
> > "
> >> set_min_output_buffer on block 7 to 207744
> >> set_min_output_buffer on block 9 to 2077440
> >> set_min_output_buffer on block 11 to 2077440
> >> set_min_output_buffer on block 12 to 207744
> >> set_min_output_buffer on block 13 to 415488
> >> set_min_output_buffer on block 14 to 207744
> >> set_min_output_buffer on block 26 to 262144
> >> set_min_output_buffer on block 27 to 96000
> >> set_min_output_buffer on block 31 to 10
> >> gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
> >> gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720
> KB
> >> gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
> >> gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720
> KB
> >> Traceback (most recent call last):
> >>  File "/home/vtti/working/wifi_tx.py", line 297, in 
> >>main()
> >>  File "/home/vtti/working/wifi_tx.py", line 276, in main
> >>tb.start()
> >>  File "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/top_block.py",
> > line 111, >in start
> >>top_block_start_unlocked(self._impl, max_noutput_items)
> >>  File
> > "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/runtime_swig.py",
> line
> >> 5828, in top_block_start_unlocked
> >>return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
> >> RuntimeError: std::bad_alloc
> > "
> > Here's a picture of my flowchart:
> > [image: gnuradio-runtimeError-bad_alloc.png]
> >
> > Tested this on a different machine, and it works fine, so the problem
> isn't
> > with the flowchart itself. I'm working off the maint-3.8 branch,
> installed
> > from source.
> >
> > Any idea why I'm getting this error, or how I could resolve it? Thanks!
> >
>


-- 
Eamon Heaney
*Fleet Commander*
*President, Model UN at Virginia Tech*


Re: [Discuss-gnuradio] buffer allocation failing with RuntimeError: bad_alloc

2019-11-21 Thread Philip Balister
Look in

${HOME}/.gnuradio/prefs/vmcircbuf_default_factory

and see what is there and maybe change to this:

gr::vmcircbuf_mmap_tmpfile_factory

Philip


On 11/21/19 4:59 AM, Eamon Heaney wrote:
> I'm running the sample wifi_tx.grc flowchart from gr-ieee802.11,
> substituting a null sink for the USRP sink to test it.
> 
> When I try to run it, it fails with the following error message:
> "
>> set_min_output_buffer on block 7 to 207744
>> set_min_output_buffer on block 9 to 2077440
>> set_min_output_buffer on block 11 to 2077440
>> set_min_output_buffer on block 12 to 207744
>> set_min_output_buffer on block 13 to 415488
>> set_min_output_buffer on block 14 to 207744
>> set_min_output_buffer on block 26 to 262144
>> set_min_output_buffer on block 27 to 96000
>> set_min_output_buffer on block 31 to 10
>> gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>> gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
>> gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>> gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
>> Traceback (most recent call last):
>>  File "/home/vtti/working/wifi_tx.py", line 297, in 
>>main()
>>  File "/home/vtti/working/wifi_tx.py", line 276, in main
>>tb.start()
>>  File "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/top_block.py",
> line 111, >in start
>>top_block_start_unlocked(self._impl, max_noutput_items)
>>  File
> "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/runtime_swig.py", line
>> 5828, in top_block_start_unlocked
>>return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
>> RuntimeError: std::bad_alloc
> "
> Here's a picture of my flowchart:
> [image: gnuradio-runtimeError-bad_alloc.png]
> 
> Tested this on a different machine, and it works fine, so the problem isn't
> with the flowchart itself. I'm working off the maint-3.8 branch, installed
> from source.
> 
> Any idea why I'm getting this error, or how I could resolve it? Thanks!
> 



Re: [Discuss-gnuradio] buffer allocation failing with RuntimeError: bad_alloc

2019-11-21 Thread Eamon Heaney
Yeah, I tried changing the maximum shared memory, but that didn't work. I
mean, it didn't resolve the problem; I gave it 2147483648 but the error
persists. I tried adding a zero to that, but that's an "Invalid Argument."

On Thu, Nov 21, 2019 at 5:17 AM Ron Economos  wrote:

> You must be running an older kernel that doesn't set kernel.shmmax to some
> large value.
>
> To check the current setting:
>
> sysctl kernel.shmmax
>
> To set it higher:
>
> sudo -w kernel.shmmax=2147483648
>
> Ron
> On 11/21/19 01:59, Eamon Heaney wrote:
>
> I'm running the sample wifi_tx.grc flowchart from gr-ieee802.11,
> substituting a null sink for the USRP sink to test it.
>
> When I try to run it, it fails with the following error message:
> "
> >set_min_output_buffer on block 7 to 207744
> >set_min_output_buffer on block 9 to 2077440
> >set_min_output_buffer on block 11 to 2077440
> >set_min_output_buffer on block 12 to 207744
> >set_min_output_buffer on block 13 to 415488
> >set_min_output_buffer on block 14 to 207744
> >set_min_output_buffer on block 26 to 262144
> >set_min_output_buffer on block 27 to 96000
> >set_min_output_buffer on block 31 to 10
> >gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
> >gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
> >gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
> >gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
> >Traceback (most recent call last):
> >  File "/home/vtti/working/wifi_tx.py", line 297, in 
> >main()
> >  File "/home/vtti/working/wifi_tx.py", line 276, in main
> >tb.start()
> >  File "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/top_block.py",
> line 111, >in start
> >top_block_start_unlocked(self._impl, max_noutput_items)
> >  File
> "/usr/local/lib/python3.6/dist-packages/gnuradio/gr/runtime_swig.py", line
> >5828, in top_block_start_unlocked
> >return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
> >RuntimeError: std::bad_alloc
> "
> Here's a picture of my flowchart:
> [image: gnuradio-runtimeError-bad_alloc.png]
>
> Tested this on a different machine, and it works fine, so the problem
> isn't with the flowchart itself. I'm working off the maint-3.8 branch,
> installed from source.
>
> Any idea why I'm getting this error, or how I could resolve it? Thanks!
> --
> Eamon Heaney
> * Fleet Commander *
> * President, Model UN at Virginia Tech *
>
>

-- 
Eamon Heaney
*Fleet Commander*
*President, Model UN at Virginia Tech*


Re: [Discuss-gnuradio] buffer allocation failing with RuntimeError: bad_alloc

2019-11-21 Thread Ron Economos
You must be running an older kernel that doesn't set kernel.shmmax to 
some large value.


To check the current setting:

sysctl kernel.shmmax

To set it higher:

sudo -w kernel.shmmax=2147483648

Ron

On 11/21/19 01:59, Eamon Heaney wrote:
I'm running the sample wifi_tx.grc flowchart from gr-ieee802.11, 
substituting a null sink for the USRP sink to test it.


When I try to run it, it fails with the following error message:
"
>set_min_output_buffer on block 7 to 207744
>set_min_output_buffer on block 9 to 2077440
>set_min_output_buffer on block 11 to 2077440
>set_min_output_buffer on block 12 to 207744
>set_min_output_buffer on block 13 to 415488
>set_min_output_buffer on block 14 to 207744
>set_min_output_buffer on block 26 to 262144
>set_min_output_buffer on block 27 to 96000
>set_min_output_buffer on block 31 to 10
>gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
>gr::vmcircbuf_mmap_shm_open: mmap (1): Cannot allocate memory
>gr::buffer::allocate_buffer: failed to allocate buffer of size 1038720 KB
>Traceback (most recent call last):
>  File "/home/vtti/working/wifi_tx.py", line 297, in 
>    main()
>  File "/home/vtti/working/wifi_tx.py", line 276, in main
>    tb.start()
>  File 
"/usr/local/lib/python3.6/dist-packages/gnuradio/gr/top_block.py", 
line 111, >in start

>    top_block_start_unlocked(self._impl, max_noutput_items)
>  File 
"/usr/local/lib/python3.6/dist-packages/gnuradio/gr/runtime_swig.py", 
line >5828, in top_block_start_unlocked

>    return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
>RuntimeError: std::bad_alloc
"
Here's a picture of my flowchart:
gnuradio-runtimeError-bad_alloc.png

Tested this on a different machine, and it works fine, so the problem 
isn't with the flowchart itself. I'm working off the maint-3.8 branch, 
installed from source.


Any idea why I'm getting this error, or how I could resolve it? Thanks!
--
Eamon Heaney
/
/Fleet Commander/
//
/President, Model UN at Virginia Tech/
/