---------- Forwarded message ----------
From: Sumedha Goyal <sumedha1...@gmail.com>
Date: Wed, Dec 18, 2013 at 12:04 PM
Subject: Re: [Discuss-gnuradio] problem with top_block.stop()
To: Tom Rondeau <t...@trondeau.com>


Hi
Following is my gdb backtrace output. Could this be of any help?
What should I look for in this backtrace to locate the problem?
Also, how should I specify breakpoints? I tried to give " (gdb) break
tb.start() " but this says Function "tb.start()" not defined.

(gdb) thread apply all backtrace

Thread 10 (Thread 0x7f004e7fc700 (LWP 17803)):
#0  0x00007f00813ea763 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f007301149d in ?? () from /usr/local/lib/libuhd.so.003
#2  0x00007f00731a1a01 in ?? () from /usr/local/lib/libuhd.so.003
#3  0x00007f00731ab0b1 in ?? () from /usr/local/lib/libuhd.so.003
#4  0x00007f007322fa93 in ?? () from /usr/local/lib/libuhd.so.003
#5  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#6  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f004effd700 (LWP 17802)):
#0  0x00007f008261c0fe in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007e9f0668 in
boost::this_thread::sleep(boost::posix_time::ptime const&) () from
/usr/lib/libboost_thread.so.1.48.0
#2  0x00007f00731b533e in ?? () from /usr/local/lib/libuhd.so.003
#3  0x00007f007322fa93 in ?? () from /usr/local/lib/libuhd.so.003
#4  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#5  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f004f7fe700 (LWP 17801)):
#0  0x00007f008261bd84 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007fa54be7 in
Theron::Detail::ThreadPool<Theron::Detail::MailboxQueue<Theron::Detail::BlockingMonitor>,
Theron::Detail::WorkerContext,
Theron::Detail::MailboxProcessor>::ThreadEntryPoint(void*) ()
   from /usr/local/lib/libgras.so.0.0.0
#2  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#3  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f004ffff700 (LWP 17800)):
#0  0x00007f008261bd84 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007fa54be7 in
Theron::Detail::ThreadPool<Theron::Detail::MailboxQueue<Theron::Detail::BlockingMonitor>,
Theron::Detail::WorkerContext,
Theron::Detail::MailboxProcessor>::ThreadEntryPoint(void*) ()
   from /usr/local/lib/libgras.so.0.0.0
#2  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#3  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f0064b62700 (LWP 17799)):
#0  0x00007f00813ea763 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0000000000449ed3 in ?? ()
#2  0x0000000000486614 in PyEval_EvalFrameEx ()
#3  0x0000000000486e02 in PyEval_EvalFrameEx ()
#4  0x000000000048d930 in PyEval_EvalCodeEx ()
#5  0x00000000004243f0 in ?? ()
#6  0x00000000004f7496 in PyObject_Call ()
#7  0x000000000046762a in ?? ()
#8  0x00000000004f7496 in PyObject_Call ()
#9  0x00000000004f9032 in PyObject_CallMethodObjArgs ()
#10 0x00007f0075bb2664 in
SwigDirector_BlockPython::_Py_work(std::vector<void*, std::allocator<void*>
> const&, std::vector<unsigned long, std::allocator<unsigned long> >
const&, std::vector<void*, std::allocator<void*> > const&,
std::vector<unsigned long, std::allocator<unsigned long> > const&) ()
   from /usr/local/lib/python2.7/dist-packages/gras/_GRAS_PyBlock.so
#11 0x00007f0075bb5458 in
gras::BlockPython::work(gras::WorkBufferArray<void con
st*> const&, gras::WorkBufferArray<void*> const&) ()
   from /usr/local/lib/python2.7/dist-packages/gras/_GRAS_PyBlock.so
#12 0x00007f007faa114c in gras::BlockActor::task_main() ()
   from /usr/local/lib/libgras.so.0.0.0
#13 0x00007f007fa93a19 in Theron::Detail::MessageHandler<gras::BlockActor,
gras::SelfKickMessage>::Handle(Theron::Actor*, Theron::Detail::IMessage
const*) ()
   from /usr/local/lib/libgras.so.0.0.0
#14 0x00007f007fa548bf in
Theron::Detail::ThreadPool<Theron::Detail::MailboxQueue<Theron::Detail::BlockingMonitor>,
Theron::Detail::WorkerContext,
Theron::Detail::MailboxProcessor>::ThreadEntryPoint(void*) ()
   from /usr/local/lib/libgras.so.0.0.0
#15 0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#16 0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#17 0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#18 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f0065363700 (LWP 17798)):
#0  0x00007f008261bd84 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007fa54be7 in
Theron::Detail::ThreadPool<Theron::Detail::MailboxQueue<Theron::Detail::BlockingMonitor>,
Theron::Detail::WorkerContext,
Theron::Detail::MailboxProcessor>::ThreadEntryPoint(void*) ()
 from /usr/local/lib/libgras.so.0.0.0
#2  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#3  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f0065b64700 (LWP 17797)):
#0  0x00007f008261c0fe in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007e9f0668 in
boost::this_thread::sleep(boost::posix_time::ptime const&) () from
/usr/lib/libboost_thread.so.1.48.0
#2  0x00007f007fa576d7 in
Theron::Detail::Scheduler<Theron::Detail::MailboxQueue<Theron::Detail::BlockingMonitor>
>::ManagerThreadProc() ()
   from /usr/local/lib/libgras.so.0.0.0
#3  0x00007f007e9edda9 in ?? () from /usr/lib/libboost_thread.so.1.48.0
#4  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f00669e4700 (LWP 17796)):
#0  0x00007f00813e5a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f00709b6ff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f00709b745a in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f006ed925e6 in ?? () from
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f00709d89b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f00671e5700 (LWP 17794)):
#0  0x00007f00813e5a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f00709b6ff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f00709b745a in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f00671ea98b in ?? ()
   from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f00709d89b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f0082617e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f00813f13fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f0082a28700 (LWP 17776)):
#0  0x00007f008261bd84 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f007faa2d51 in
boost::condition_variable::wait(boost::unique_lock<boost::mutex>&) () from
/usr/local/lib/libgras.so.0.0.0
#2  0x00007f007fabd92d in void
gras::ElementImpl::bcast_prio_msg<gras::TopInertMessage>(gras::TopInertMessage
const&) [clone .constprop.283] ()
   from /usr/local/lib/libgras.so.0.0.0
#3  0x00007f007fabdba5 in gras::TopBlock::stop() ()
   from /usr/local/lib/libgras.so.0.0.0
#4  0x00007f007599e141 in gras::TopBlockPython::stop() ()
   from /usr/local/lib/python2.7/dist-packages/gras/_GRAS_PyHierBlocks.so
#5  0x00007f0075dc8de3 in _wrap_TopBlock_stop ()
   from /usr/local/lib/python2.7/dist-packages/gras/_GRAS_TopBlock.so
#6  0x0000000000486614 in PyEval_EvalFrameEx ()
#7  0x0000000000486e02 in PyEval_EvalFrameEx ()
#8  0x0000000000486e02 in PyEval_EvalFrameEx ()
#9  0x000000000048d930 in PyEval_EvalCodeEx ()
#10 0x00000000004246a1 in PyRun_FileExFlags ()
#11 0x000000000042492e in PyRun_SimpleFileExFlags ()
#12 0x0000000000425cb6 in Py_Main ()
#13 0x00007f008131e76d in __libc_start_main ()
   from /lib/x86_64-linux-gnu/libc.so.6


Thanks and Regards,
Sumedha




On Wed, Dec 18, 2013 at 10:50 AM, Sumedha Goyal <sumedha1...@gmail.com>wrote:

> Hi
> My flowgraph does not stop naturally. I want to stop and start it again
> using different value for a parameter as shown in my above question.
> There is an event in my program where the flowgraph finishes it's job with
> first parameter value (which is 0.8 here), at the occurrence of that event
> I want the control of flowgraph to come back to the main(). Then I want to
> restart the flowgraph with a new parameter value (which is 0.4 here).
>  Kindly guide me on this.
>
> Also, can I forcibly bring the control back to main() even when the
> flowgraph doesn't have anything to stop its execution?
>
> Thanks and Regards,
> Sumedha
>
>
> On Tue, Dec 17, 2013 at 11:24 PM, Tom Rondeau <t...@trondeau.com> wrote:
>
>> On Tue, Dec 17, 2013 at 12:23 PM, Sumedha Goyal <sumedha1...@gmail.com>
>> wrote:
>> > I am trying to pass two different parameters to my top_block class
>> > I m not able to do this please help. The control of program gets stuck
>> at
>> > tb.stop() and doesn't go beyond that.
>> >
>> > tb=top_block(options,0.8)
>> > tb.start()
>> > tb.wait()
>> > tb.stop()
>> > sleep(5)
>> > print "I AM BACK"
>> > tb1=top_block(options,0.4)
>> > tb1.start()
>> > tb1.wait()
>> > tb1.stop()
>> > sleep()
>> >
>> > Regards,
>> > Sumedha
>>
>> Does your flowgraph in tb naturally stop? The tb.wait() is a blocking
>> call and will halt the main loop there until all threads (blocks) in
>> tb are done. If your flowgraph doesn't have something that stops
>> execution (like a finite file or a blocks.head block), then it will
>> continue to process forever and your tb.wait() will continue to block.
>>
>> Tom
>>
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to