GNU Radio Unstable Behavior

I set up a two-node link using tunnel.py, two nodes continuously
exchanged data
with each other. Quite often, GNU Radio stopped in one node because of
the
following error. Any hints to resolve this problem will be highly
appreciated.

Andrew

Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python2.6/threading.py”, line 532, in __bootstrap_inner
self.run()
File “/home/titan/new_multi_chan/pkt.py”, line 95, in run
ok, payload = packet_utils.unmake_packet(msg.to_string(),
int(msg.arg1()))
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/packet_utils.py”, line
183, in unmake_packet
payload_with_crc = dewhiten(whitened_payload_with_crc,
whitener_offset)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/packet_utils.py”, line
95, in dewhiten
return whiten(s, o) # self inverse
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/packet_utils.py”, line
91, in whiten
z = sa ^ random_mask_vec8[o:len(sa)+o]
ValueError: shape mismatch: objects cannot be broadcast to a single
shape

On Tue, Nov 16, 2010 at 11:51:51AM -0500, [email protected] wrote:

File “/home/titan/new_multi_chan/pkt.py”, line 95, in run
ValueError: shape mismatch: objects cannot be broadcast to a single shape

I looks like you may be passing a zero-length string to unmake_packet,
and that whiten doesn’t not properly deal with a zero length string.

Try not calling unmake_packet if msg.to_string() returns a zero length
string.

Eric

Eric,

In my experiments, I had one transmitter and one receiver, which used
tunnel.py for communicating with each other. Occasionally, I got the
problem that one radio stopped receiving, but could still transmit. I
used TX and RX printings to observe this behavior. In the receiving
path, there is one thread to put received packets into a queue and
another thread to read out the packets from this queue. Is it possible
that these two threads can get deadlocked?

Once the above behavior happened, I used oprifile to see what’s still
running, here is the data:

CPU: Core 2, speed 1600 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (Unhalted core cycles) count 50000
samples % image name app name
symbol name
505795 36.8303 /no-vmlinux /no-vmlinux
/no-vmlinux
91821 6.6861 /lib/libgcc_s.so.1 /lib/libgcc_s.so.1
/lib/libgcc_s.so.1
63582 4.6298 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_block_executor::run_one_iteration()
62849 4.5765 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0 gr_fast_atan2f(float,
float)
52437 3.8183 /lib/tls/i686/cmov/libm-2.11.1.so
/lib/tls/i686/cmov/libm-2.11.1.so /lib/tls/i686/cmov/libm-2.11.1.so
41528 3.0239 /lib/tls/i686/cmov/libpthread-2.11.1.so
/lib/tls/i686/cmov/libpthread-2.11.1.so pthread_mutex_lock
40215 2.9283 /usr/lib/libfftw3f.so.3.2.4
/usr/lib/libfftw3f.so.3.2.4 /usr/lib/libfftw3f.so.3.2.4
32285 2.3509 /lib/tls/i686/cmov/libpthread-2.11.1.so
/lib/tls/i686/cmov/libpthread-2.11.1.so __pthread_mutex_unlock_usercnt
27639 2.0126 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0 ccomplex_dotprod_sse
25218 1.8363 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_clock_recovery_mm_ff::general_work(int, std::vector<int,
std::allocator >&, std::vector<void const*, std::allocator<void
const*> >&, std::vector<void*, std::allocator<void*> >&)
24609 1.7919 /lib/tls/i686/cmov/libc-2.11.1.so
/lib/tls/i686/cmov/libc-2.11.1.so /lib/tls/i686/cmov/libc-2.11.1.so
23391 1.7033 /usr/bin/python2.6 /usr/bin/python2.6
/usr/bin/python2.6
22216 1.6177 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_fir_ccc_simd::filter(std::complex const*)
19529 1.4220 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gri_fft_filter_ccc_generic::filter(int, std::complex const*,
std::complex)
19382 1.4113 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
min_available_space(gr_block_detail
, int)
17852 1.2999 [vdso] (tgid:2135 range:0x5bd000-0x5be000)
/usr/bin/python2.6 [vdso] (tgid:2135 range:0x5bd000-0x5be000)
17703 1.2891 /lib/tls/i686/cmov/libpthread-2.11.1.so
/lib/tls/i686/cmov/libpthread-2.11.1.so pthread_cond_signal@@GLIBC_2.3.2
17030 1.2401 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_freq_xlating_fir_filter_ccc::work(int, std::vector<void const*,
std::allocator<void const*> >&, std::vector<void*, std::allocator<void*>

&)
15846 1.1539 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_tpb_detail::notify_downstream(gr_block_detail*)
15706 1.1437 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_tpb_detail::notify_upstream(gr_block_detail*)
15387 1.1204 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0 float_dotprod_sse
14412 1.0494 /usr/bin/oprofiled /usr/bin/oprofiled
/usr/bin/oprofiled
12486 0.9092 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_keep_one_in_n::general_work(int, std::vector<int, std::allocator
&, std::vector<void const*, std::allocator<void const*> >&,
std::vector<void*, std::allocator<void*> >&)
12119 0.8825 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_quadrature_demod_cf::work(int, std::vector<void const*,
std::allocator<void const*> >&, std::vector<void*, std::allocator<void*>
&)
11792 0.8587 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_count_bits32(unsigned int)
10476 0.7628 /usr/lib/libboost_thread.so.1.40.0
/usr/lib/libboost_thread.so.1.40.0 /usr/lib/libboost_thread.so.1.40.0
9285 0.6761 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gr_tpb_thread_body::gr_tpb_thread_body(boost::shared_ptr<gr_block>)
9073 0.6607 /lib/tls/i686/cmov/libpthread-2.11.1.so
/lib/tls/i686/cmov/libpthread-2.11.1.so pthread_cond_wait@@GLIBC_2.3.2
8443 0.6148 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
gri_mmse_fir_interpolator::interpolate(float const*, float) const
7698 0.5605 /usr/local/lib/libusrp2-3.3.1git.so.0.0.0
/usr/local/lib/libusrp2-3.3.1git.so.0.0.0
usrp2::copy_u2_16sc_to_host_32fc(unsigned int, unsigned int const*,
std::complex*)
7512 0.5470 /usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0
/usr/local/lib/libgnuradio-core-3.3.1git.so.0.0.0 __i686.get_pc_thunk.bx