Segmentation fault in narrowband benchmark_rx.py

Hello Everyone,

Not sure if this is already discussed here.

I am facing segmentation fault when running benchmark_rx in narrowband
examples. It seems like those example used to work fine before, but now
they are having these issues.

on the receiver side

manu@radio3:narrowband$ ./benchmark_rx.py -f 900M -m bpsk --rx-gain=25
-r 1M
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.006.002-1-g9fd308b3

Using Volk machine: avx_64_mmx_orc
– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam
Warning: Failed to enable realtime scheduling.
Segmentation fault (core dumped)

What is confusing is that the segmentation fault comes when the
transmitter
is initialized.

On the other hand when I run gmsk it seems to work fine.

================================================
manu@radio3:narrowband$ ./benchmark_rx.py -f 900M -m gmsk --rx-gain=25
-r 2M
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.006.002-1-g9fd308b3

Using Volk machine: avx_64_mmx_orc
– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam

UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is
enabled.
decimation = dsp_rate/samp_rate -> 25 = (100.000000 MHz)/(4.000000
MHz)
Warning: Failed to enable realtime scheduling.

UHD Warning:
The requested decimation is odd; the user should expect CIC rolloff.
Select an even decimation to ensure that a halfband filter is
enabled.
decimation = dsp_rate/samp_rate -> 25 = (100.000000 MHz)/(4.000000
MHz)
ok = True pktno = 0 n_rcvd = 1 n_right = 1
ok = True pktno = 1 n_rcvd = 2 n_right = 2
ok = True pktno = 2 n_rcvd = 3 n_right = 3
ok = True pktno = 3 n_rcvd = 4 n_right = 4
ok = True pktno = 4 n_rcvd = 5 n_right = 5
ok = True pktno = 5 n_rcvd = 6 n_right = 6

===================================================
manu@radio3:narrowband$ gnuradio-config-info -v
v3.7.2.1-159-g3fa56a46

manu@radio3:narrowband$ uname --all
Linux radio3 3.8.0-36-generic #52~precise1-Ubuntu SMP Mon Feb 3 21:54:46
UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Any ideas??

On Wed, Feb 26, 2014 at 12:01 PM, Manu T S [email protected]
wrote:

Hello Everyone,

Not sure if this is already discussed here.

I am facing segmentation fault when running benchmark_rx in narrowband
examples. It seems like those example used to work fine before, but now they
are having these issues.

Manu T S

This could be an issue related to the constellation_receiver QA issue
a few people have seen lately. I can’t replicate it on my end, but
Nathan can and is helping to track it down.

Tom

On Wednesday, February 26, 2014, Tom R. [email protected] wrote:

That was my first thought as well. At this point we should probably file
this in the bug tracker.

Manu,

Can you send me a backtrace, your processor type, and compiler
information?

Nathan

Hi,

Thanks for the responses.

Output to “lscpu”, “cat /proc/cpuinfor”, “gcc -v”, “python” can be found
in
the link below:

http://home.iitb.ac.in/~manu.ts/cpu-info

I am still figuring out how to get the backtrace.

On Wed, Feb 26, 2014 at 11:26 PM, West, Nathan

I am facing segmentation fault when running benchmark_rx in narrowband
Nathan can and is helping to track it down.
Can you send me a backtrace, your processor type, and compiler
information?

Nathan

On Wed, Feb 26, 2014 at 12:33 PM, Manu T S [email protected]
wrote:


Manu T S

$ gdb python # this brings up gdb prompt:
(gdb) run benchmark_rx.py -f 900M -m bpsk --rx-gain=25 -r 1M

then it will run, probably crash. then enter
(gdb) bt

Nathan

Also hoping that it would solve the issue, I rebuilt GNU Radio from
todays
pull. But that didn’t help.

manu@radio1:narrowband$ gnuradio-config-info -v
v3.7.2.1-251-g67882eec

Thanks for the help. Here is the output.

============================================
manu@radio1:narrowband$ gdb python
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<The GNU General Public License v3.0 - GNU Project - Free Software Foundation

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show
copying”
and “show warranty” for details.
This GDB was configured as “x86_64-linux-gnu”.
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/
Reading symbols from /usr/bin/python…(no debugging symbols
found)…done.
(gdb) run benchmark_rx.py -f 900M -m bpsk --rx-gain=25 -r 1M
Starting program: /usr/bin/python benchmark_rx.py -f 900M -m bpsk
–rx-gain=25 -r 1M
warning: no loadable sections found in added symbol-file system-supplied
DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library
“/lib/x86_64-linux-gnu/libthread_db.so.1”.
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.006.002-1-g9fd308b3

Using Volk machine: avx_64_mmx_orc
[New Thread 0x7fffe979f700 (LWP 31208)]
[Thread 0x7fffe979f700 (LWP 31208) exited]
[New Thread 0x7fffe979f700 (LWP 31209)]
[Thread 0x7fffe979f700 (LWP 31209) exited]
[New Thread 0x7fffe979f700 (LWP 31210)]
[Thread 0x7fffe979f700 (LWP 31210) exited]
– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes
[New Thread 0x7fffe979f700 (LWP 31211)]

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
[New Thread 0x7fffe8d91700 (LWP 31212)]

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam
[New Thread 0x7fffe3fff700 (LWP 31213)]
Warning: Failed to enable realtime scheduling.
[New Thread 0x7fffe37fe700 (LWP 31214)]
[New Thread 0x7fffe2ffd700 (LWP 31215)]
[New Thread 0x7fffe27fc700 (LWP 31216)]
[New Thread 0x7fffe1ffb700 (LWP 31217)]
[New Thread 0x7fffe17fa700 (LWP 31218)]
[New Thread 0x7fffe0ff9700 (LWP 31219)]
[New Thread 0x7fffc7fff700 (LWP 31220)]
[New Thread 0x7fffc77fe700 (LWP 31221)]
[New Thread 0x7fffc6ffd700 (LWP 31222)]
[New Thread 0x7fffc67fc700 (LWP 31223)]
[New Thread 0x7fffc5ffb700 (LWP 31224)]
[New Thread 0x7fffc57fa700 (LWP 31225)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe0ff9700 (LWP 31219)]
0x00007ffff46534b7 in volk_32fc_32f_dot_prod_32fc_a_sse ()
from /usr/local/lib/libvolk.so.0.0.0
(gdb)

On Thu, Feb 27, 2014 at 12:13 AM, West, Nathan

For future reference:

http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging

Martin

Sorry that I forgot to run “bt” yesterday. Here is the output of bt.

=================================================
manu@radio1:narrowband$ gdb python
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<The GNU General Public License v3.0 - GNU Project - Free Software Foundation

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show
copying”
and “show warranty” for details.
This GDB was configured as “x86_64-linux-gnu”.
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/
Reading symbols from /usr/bin/python…(no debugging symbols
found)…done.
(gdb) run benchmark_rx.py -f 900M -m bpsk -r 1M --rx-gain=25
Starting program: /usr/bin/python benchmark_rx.py -f 900M -m bpsk -r 1M
–rx-gain=25
[Thread debugging using libthread_db enabled]
Using host libthread_db library
“/lib/x86_64-linux-gnu/libthread_db.so.1”.
linux; GNU C++ version 4.6.3; Boost_104800; UHD_003.006.002-1-g9fd308b3

Using Volk machine: avx_64_mmx_orc
[New Thread 0x7fffe979f700 (LWP 2944)]
[Thread 0x7fffe979f700 (LWP 2944) exited]
[New Thread 0x7fffe979f700 (LWP 2945)]
[Thread 0x7fffe979f700 (LWP 2945) exited]
[New Thread 0x7fffe979f700 (LWP 2946)]
[Thread 0x7fffe979f700 (LWP 2946) exited]
– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes
[New Thread 0x7fffe979f700 (LWP 2947)]

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 1000000 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576
[New Thread 0x7fffe8d91700 (LWP 2948)]

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam
[New Thread 0x7fffe3fff700 (LWP 2949)]
Warning: Failed to enable realtime scheduling.
[New Thread 0x7fffe37fe700 (LWP 2950)]
[New Thread 0x7fffe2ffd700 (LWP 2951)]
[New Thread 0x7fffe27fc700 (LWP 2952)]
[New Thread 0x7fffe1ffb700 (LWP 2953)]
[New Thread 0x7fffe17fa700 (LWP 2954)]
[New Thread 0x7fffe0ff9700 (LWP 2955)]
[New Thread 0x7fffbffff700 (LWP 2956)]
[New Thread 0x7fffb7fff700 (LWP 2957)]
[New Thread 0x7fffbf7fe700 (LWP 2958)]
[New Thread 0x7fffbeffd700 (LWP 2959)]
[New Thread 0x7fffbe7fc700 (LWP 2960)]
[New Thread 0x7fffbdffb700 (LWP 2961)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe0ff9700 (LWP 2955)]
0x00007ffff46534b7 in volk_32fc_32f_dot_prod_32fc_a_sse ()
from /usr/local/lib/libvolk.so.0.0.0
(gdb) bt
#0 0x00007ffff46534b7 in volk_32fc_32f_dot_prod_32fc_a_sse ()
from /usr/local/lib/libvolk.so.0.0.0
#1 0x00007fffedac8c18 in
gr::filter::kernel::fir_filter_ccf::filter(std::complex const*)
()
from /usr/local/lib/libgnuradio-filter-3.7.3git.so.0.0.0
#2 0x00007fffee0687b0 in
gr::digital::pfb_clock_sync_ccf_impl::general_work(int, std::vector<int,
std::allocator >&, std::vector<void const*, std::allocator<void
const*> >&, std::vector<void*, std::allocator<void*> >&) ()
from /usr/local/lib/libgnuradio-digital-3.7.3git.so.0.0.0
#3 0x00007ffff5232053 in gr::block_executor::run_one_iteration() ()
from /usr/local/lib/libgnuradio-runtime-3.7.3git.so.0.0.0
#4 0x00007ffff5274aa3 in
gr::tpb_thread_body::tpb_thread_body(boost::shared_ptrgr::block, int)
()
from /usr/local/lib/libgnuradio-runtime-3.7.3git.so.0.0.0
#5 0x00007ffff5266be6 in
boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrappergr::tpb_container,
void>::invoke(boost::detail::function::function_buffer&) () from
/usr/local/lib/libgnuradio-runtime-3.7.3git.so.0.0.0
#6 0x00007ffff521fbae in
boost::detail::thread_data<boost::function0

::run()
() from /usr/local/lib/libgnuradio-runtime-3.7.3git.so.0.0.0
#7 0x00007ffff48d7da9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#8 0x00007ffff7bc4e9a in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007ffff699e3fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
(gdb)

=======================================================

Dear Sir,
I am new beginner for USRP N210.
I am facing this problem. Anybody please help me.

<<< Welcome to GNU Radio Companion 3.7.2.1 >>>

Showing: “”

Loading: “/home/dsplab/Desktop/BRIJENDRA/SINE_RX_TX.grc”

Done

Showing: “/home/dsplab/Desktop/BRIJENDRA/SINE_RX_TX.grc”

Generating: “/home/dsplab/Desktop/BRIJENDRA/top_block.py”

Generating: “/home/dsplab/Desktop/BRIJENDRA/top_block.py”

Executing: “/home/dsplab/Desktop/BRIJENDRA/top_block.py”

linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.005.005-0-unknown

– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 163840 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 163840 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 163840 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam
U

Done

BRIJENDRA SHARMA
PROJECT SCIENTIST