[ 
https://issues.apache.org/jira/browse/ARROW-6977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958299#comment-16958299
 ] 

Neal Richardson commented on ARROW-6977:
----------------------------------------

With lldb:

{code}
Assertion failed: (ec == 0), function unlock, file 
/BuildRoot/Library/Caches/com.apple.xbs/Sources/libcxx/libcxx-400.9.4/src/mutex.cpp,
 line 48.
Process 36128 stopped
* thread #10, stop reason = signal SIGABRT
    frame #0: 0x00007fff729182c6 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff729182c6 <+10>: jae    0x7fff729182d0            ; <+20>
    0x7fff729182c8 <+12>: movq   %rax, %rdi
    0x7fff729182cb <+15>: jmp    0x7fff72912457            ; cerror_nocancel
    0x7fff729182d0 <+20>: retq   
Target 0: (R) stopped.
(lldb) bt
* thread #10, stop reason = signal SIGABRT
  * frame #0: 0x00007fff729182c6 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff729cdbf1 libsystem_pthread.dylib`pthread_kill + 284
    frame #2: 0x00007fff728826a6 libsystem_c.dylib`abort + 127
    frame #3: 0x00007fff7284b20d libsystem_c.dylib`__assert_rtn + 324
    frame #4: 0x00007fff6f7e79a4 libc++.1.dylib`std::__1::mutex::unlock() + 46
    frame #5: 0x000000010a8d991a 
libarrow.100.dylib`std::__1::unique_lock<std::__1::mutex>::~unique_lock(this=0x000070000935db70)
 at __mutex_base:153:19
    frame #6: 0x000000010a8d9715 
libarrow.100.dylib`std::__1::unique_lock<std::__1::mutex>::~unique_lock(this=0x000070000935db70)
 at __mutex_base:151:5
    frame #7: 0x000000010a8d96c1 
libarrow.100.dylib`arrow::internal::ThreadedTaskGroup::OneTaskDone(this=0x0000000102373b00)
 at task_group.cc:152:5
    frame #8: 0x000000010a8dbe5f 
libarrow.100.dylib`arrow::internal::ThreadedTaskGroup::AppendReal(this=0x000000010232cfe0)>)::'lambda'()::operator()()
 const at task_group.cc:97:9
    frame #9: 0x000000010a8dbd9d 
libarrow.100.dylib`decltype(__f=0x000000010232cfe0)>)::'lambda'()&>(fp)()) 
std::__1::__invoke<arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 
()>)::'lambda'()&>(arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'()&) at type_traits:4361:1
    frame #10: 0x000000010a8dbd4d libarrow.100.dylib`void 
std::__1::__invoke_void_return_wrapper<void>::__call<arrow::internal::ThreadedTaskGroup::AppendReal(__args=0x000000010232cfe0)>)::'lambda'()&>(arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'()&) at __functional_base:349:9
    frame #11: 0x000000010a8dbd1d 
libarrow.100.dylib`std::__1::__function::__alloc_func<arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'(), 
std::__1::allocator<arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'()>, void ()>::operator(this=0x000000010232cfe0)() at 
functional:1527:16
    frame #12: 0x000000010a8daa59 
libarrow.100.dylib`std::__1::__function::__func<arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'(), 
std::__1::allocator<arrow::internal::ThreadedTaskGroup::AppendReal(std::__1::function<arrow::Status
 ()>)::'lambda'()>, void ()>::operator(this=0x000000010232cfd0)() at 
functional:1651:12
    frame #13: 0x000000010a8e5185 
libarrow.100.dylib`std::__1::__function::__value_func<void 
()>::operator(this=0x000070000935ddf0)() const at functional:1799:16
    frame #14: 0x000000010a8e4d35 libarrow.100.dylib`std::__1::function<void 
()>::operator(this=0x000070000935ddf0)() const at functional:2347:12
    frame #15: 0x000000010a8e46fa 
libarrow.100.dylib`arrow::internal::WorkerLoop(state=std::__1::shared_ptr<arrow::internal::ThreadPool::State>::element_type
 @ 0x000000010092e548 strong=17 weak=1, it=std::__1::list<std::__1::thread, 
std::__1::allocator<std::__1::thread> >::iterator @ 0x000070000935dde8) at 
thread_pool.cc:88:9
    frame #16: 0x000000010a8e4451 
libarrow.100.dylib`arrow::internal::ThreadPool::LaunchWorkersUnlocked(this=0x0000000100a1cde8)::$_1::operator()()
 const at thread_pool.cc:225:37
    frame #17: 0x000000010a8e43cd 
libarrow.100.dylib`decltype(__f=0x0000000100a1cde8)::$_1>(fp)()) 
std::__1::__invoke<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_1>(arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_1&&)
 at type_traits:4361:1
    frame #18: 0x000000010a8e4335 libarrow.100.dylib`void 
std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, 
std::__1::default_delete<std::__1::__thread_struct> >, 
arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_1>(__t=size=2, 
(null)=__tuple_indices<> @ 0x000070000935deb8)::$_1>&, 
std::__1::__tuple_indices<>) at thread:342:5
    frame #19: 0x000000010a8e3b16 libarrow.100.dylib`void* 
std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct,
 std::__1::default_delete<std::__1::__thread_struct> >, 
arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_1> 
>(__vp=0x0000000100a1cde0) at thread:352:5
    frame #20: 0x00007fff729cb2eb libsystem_pthread.dylib`_pthread_body + 126
    frame #21: 0x00007fff729ce249 libsystem_pthread.dylib`_pthread_start + 66
    frame #22: 0x00007fff729ca40d libsystem_pthread.dylib`thread_start + 13
{code}

> [C++] Only enable jemalloc background_thread if feature is supported
> --------------------------------------------------------------------
>
>                 Key: ARROW-6977
>                 URL: https://issues.apache.org/jira/browse/ARROW-6977
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>         Environment: macOS 10.14, Homebrew
>            Reporter: Neal Richardson
>            Priority: Major
>             Fix For: 1.0.0, 0.15.1
>
>
> Followup to ARROW-6910. When loading the R package after that patch merged, I 
> get this new message:
> {code}
> $ R
> > library(arrow)
> <jemalloc>: option background_thread currently supports pthread only
> {code}
> https://github.com/jemalloc/jemalloc/blob/3d84bd57f4954a17059bd31330ec87d3c1876411/src/background_thread.c#L884-L887
>  is where the message comes from. Tracing that further, 
> {{have_background_thread}} comes from 
> https://github.com/jemalloc/jemalloc/blob/21cfe59ff7b10a61dabe26cd3dbfb7a255e1f5e8/include/jemalloc/internal/jemalloc_preamble.h.in#L205-L211,
>  which gets set in {{configure.ac}} here: 
> https://github.com/jemalloc/jemalloc/blob/d2dddfb82aac9f2212922eb90324e84790704bfe/configure.ac#L2155-L2157
> In sum, on my system, that flag doesn't get set, so 
> {{have_background_thread}} is false, and when that is false and the 
> {{background_thread}} option is true, I get that message printed. And I do 
> not want to see that message.
> cc [~wesm]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to