discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] usrp2 destruction hangs


From: Gaetano Mendola
Subject: [Discuss-gnuradio] usrp2 destruction hangs
Date: Thu, 11 Mar 2010 12:22:12 +0100

Hi all,
sometime I have my application hanging at the exit, I reported at the
end of this mail the backtrace of
my application that show where it is hanging.

My class USRPSource has a member:

usrp2::usrp2::sptr theDevice;

the USRPSource DTOR does the following:

~USRPSource() {
  theDevice->stop_rx_streaming();
}

How you can see from backtrace the pthread_join performed by
omni_thread::join () doesn't return and the
thread is actualy calling the poll.

The strace on that thread "poll"ing is doing:
poll([{fd=4, events=POLLIN}], 1, 100)   = 1 ([{fd=4, revents=POLLIN}])
poll([{fd=4, events=POLLIN}], 1, 100)   = 1 ([{fd=4, revents=POLLIN}])
poll([{fd=4, events=POLLIN}], 1, 100)   = 1 ([{fd=4, revents=POLLIN}])
....

so it seems that the call theDevice->stop_rx_streaming(); had no effect.

Are you experiencing this? (the libursp I'm using was get from a git
pull around december).

Regards
Gaetano Mendola



(gdb) thread 1
[Switching to thread 1 (Thread 0x2b5969a573b0 (LWP 10370))]#0
0x0000003334607955 in pthread_join ()
   from /lib64/libpthread.so.0
(gdb) bt
#0  0x0000003334607955 in pthread_join () from /lib64/libpthread.so.0
#1  0x0000003f42204177 in omni_thread::join () from
/usr/lib64/libgromnithread.so.0
#2  0x00002b5965ef52c6 in usrp2::usrp2::impl::stop_bg () from
/usr/lib64/libusrp2.so.0
#3  0x00002b5965ef9054 in usrp2::usrp2::impl::~impl () from
/usr/lib64/libusrp2.so.0
#4  0x00002b5965ef2c92 in usrp2::usrp2::~usrp2 () from /usr/lib64/libusrp2.so.0
#5  0x00002b5965ef4282 in
boost::detail::sp_counted_impl_p<usrp2::usrp2>::dispose () from
/usr/lib64/libusrp2.so.0
#6  0x0000000000420949 in boost::detail::shared_count::~shared_count ()
#7  0x00002b5965c8e09c in USRPSource<Vector<Ipp32fc,
IppFramework::ComplexAllocator, IppFramework> >::~USRPSource ()
   from 
/home/kalman/svn_store/RadioSuite/project/linux/kdevelop/optimized/Libraries/.libs/libsettingsparser.0
#8  0x0000000000420949 in boost::detail::shared_count::~shared_count ()
#9  0x0000000000424767 in
boost::detail::sp_counted_impl_p<SettingsDemodulator>::dispose ()
#10 0x0000000000420949 in boost::detail::shared_count::~shared_count ()
#11 0x0000000000420ffb in EssaSettings::~EssaSettings ()
#12 0x0000003333a333a5 in exit () from /lib64/libc.so.6
#13 0x0000003333a1d99b in __libc_start_main () from /lib64/libc.so.6
#14 0x000000000041b6e9 in _start ()
(gdb) thread 2
[Switching to thread 2 (Thread 0x41b74940 (LWP 10395))]#0
0x0000003333acae46 in poll () from /lib64/libc.so.6
(gdb) bt
#0  0x0000003333acae46 in poll () from /lib64/libc.so.6
#1  0x00002b5965eec503 in usrp2::eth_buffer::rx_frames () from
/usr/lib64/libusrp2.so.0
#2  0x00002b5965ef7a14 in usrp2::usrp2::impl::bg_loop () from
/usr/lib64/libusrp2.so.0
#3  0x00002b5965efad99 in usrp2::usrp2_thread::run_undetached () from
/usr/lib64/libusrp2.so.0
#4  0x0000003f4220409d in omni_thread_wrapper () from
/usr/lib64/libgromnithread.so.0
#5  0x0000003334606617 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003333ad3c2d in clone () from /lib64/libc.so.6
(gdb) thread 3
[Switching to thread 3 (Thread 0x41173940 (LWP 10392))]#0
0x000000333460af70 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
(gdb) bt
#0  0x000000333460af70 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00002b5968130cdf in ?? () from
/opt/intel/Compiler/11.1/056/lib/intel64/libiomp5.so
#2  0x0000003334606617 in start_thread () from /lib64/libpthread.so.0
#3  0x0000003333ad3c2d in clone () from /lib64/libc.so.6









-- 
cpp-today.blogspot.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]