I have an OpenCV 2.4.6 application (compiled with TBB), running in ARM cortex A9 board (Odroid X2). I get segmentation fault when running the application, so first I debug with gdb. gdb cannot finish the backtrace, giving message:
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
But it did output some trace, leading to TBB:
#3 0x001752f4 in tbb::interface6::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner con)
()
#4 0x00502d9e in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) ()
#5 0x00503610 in tbb::internal::arena::process(tbb::internal::generic_scheduler&) ()
#6 0x00506aa0 in tbb::internal::market::process(rml::job&) ()
#7 0x0050773e in tbb::internal::rml::private_worker::run() ()
#8 0x00507a7a in tbb::internal::rml::private_worker::thread_routine(void*) ()
#9 0xb6fafcb0 in start_thread () from /usr/lib/libpthread.so.0
I tried running without TBB, and it runs fine. But I need TBB because it helps my application runs 2-3x faster, so I debug with Valgrind based on my previous experience with segmentation fault and multithreading problem. Unfortunately too, Valgrind stops and messages appear, seems related to kernel (?):
[27140.140000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[27140.140000] pgd = ebf10000
[27140.140000] [00000000] *pgd=6a02e831, *pte=00000000, *ppte=00000000
[27140.140000] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[27140.140000] Modules linked in: r8712u(C) ath9k_htc ath9k_common ath9k_hw ath mac80211 cfg80211 rfkill vfat fat smsc95xx uvcvideo usbnet vide6
...
[27140.140000] Code: e3110001 0a00004d e59f1150 e5911000 (e7912102)
[27140.140000] ---[ end trace ce3bd4d9f0a91ec4 ]---
[27140.140000] note: memcheck-arm-li[5626] exited with preempt_count 1
I am pretty new to Linux and debugging tool, thus I will be most grateful if you can help me understand what happened. Is it my application runs bad? Is it Valgrind that cause the crash? Do I need to reinstall Linux?
Oh yeah, I cannot type anything to the console after the message, but if I turn the device off, then on again, I can start using Linux again. Thanks!