简体   繁体   English

TBB 分配发出终止信号

[英]TBB allocation issuing a kill signal

My C++ program (running on Mac OS) got killed.我的 C++ 程序(在 Mac OS 上运行)被杀死了。 Upon running with a debugger, I obtain the following:使用调试器运行后,我获得以下信息:

Process 90937 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL
frame #0: 0x000000010001fc50 captureISO`tbb::interface9::internal::start_for<WDutils::Parallel::details::blocked_range_terminating<unsigned long>, (anonymous namespace)::simulations::sampleSome(bool)::$_2, tbb::auto_partitioner const>::run_body(WDutils::Parallel::details::blocked_range_terminating<unsigned long>&) [inlined] tbb::concurrent_vector<(anonymous namespace)::simulations::initialCondition, tbb::cache_aligned_allocator<(anonymous namespace)::simulations::initialCondition> >::push_back(this=0x00007fff5fbfebd0)::simulations::initialCondition const&) at concurrent_vector.h:846 [opt]
   843         iterator push_back( const_reference item )
   844         {
   845             push_back_helper prolog(*this);
-> 846             new(prolog.internal_push_back_result()) T(item);
   847             return prolog.return_iterator_and_dismiss();
   848         }
   849

So, it appears that the kill signal was issued by allocation within tbb::concurrent_vector<> .因此, tbb::concurrent_vector<>信号似乎是由tbb::concurrent_vector<>内的分配发出的。 However, neither the documentation for tbb::concurrent_vector::push_back() , nor that for operator new suggest such action.但是, tbb::concurrent_vector::push_back()operator new的文档都没有建议这种操作。

Is this an undocumented behaviour of TBB (prefer to kill the running process, because TBB cannot deal appropriately with exceptions)?这是TBB未记录的行为吗(宁愿终止正在运行的进程,因为 TBB 无法适当处理异常)? How can I find out and how can I avoid this?我如何才能找出以及如何避免这种情况?

You probably need to optimize your algorithm to use less memory.您可能需要优化算法以使用更少的内存。

I don't know how macOS handles memory allocation, but on Linux, if you use too much memory, " OOM Killer " will send the SIGKILL signal.我不知道 macOS 是如何处理内存分配的,但在 Linux 上,如果您使用太多内存,“ OOM Killer ”会发送 SIGKILL 信号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TBB任务分配声明 - TBB task allocation assertion 使用INTEL TBB的可扩展内存分配 - Scalable Memory Allocation using INTEL TBB 向自己发送终止信号 - Send a kill signal to self 如何在任务组中等待Intel TBB中的单个任务并杀死其他任务? - How to wait for a single task in Intel TBB in a task group and kill others? 在mingw中发送信号的“ kill”功能在哪里? - where is the “kill” function that sent signal in mingw? c++ 并行算法调用期间的安全内存分配(使用英特尔 TBB)? - Safe Memory allocation during a c++ parallel algorithms invocation (with Intel TBB)? 在C ++ 11中,signal.h标头没有kill功能 - In C++11 the signal.h header has no kill function 是否将带有kill的信号发送到父线程保证在下一条语句之前被处理? - Is a signal sent with kill to a parent thread guaranteed to be processed before the next statement? 在多线程c ++ 0x11程序中使用zmq :: poll结合cntr + x或kill信号 - using zmq::poll in multithreaded c++0x11 program in combination with cntr +x or kill signal 导致 SIGSEGV(信号:分段违规)的动态内存分配,试图使用 malloc 和 free - Dynamic memory allocation causing SIGSEGV (Signal: segmentation violation), In attempt to work with malloc and free
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM