You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/19 14:48:15 UTC

[GitHub] [pulsar] BewareMyPower edited a comment on issue #11635: [Tests] "python pulsar_test.py" failed with segmentation fault and core dump

BewareMyPower edited a comment on issue #11635:
URL: https://github.com/apache/pulsar/issues/11635#issuecomment-946797373


   I reproduced it in my local env and analyzed the core using `gdb`.
   
   Here is the most important stack:
   
   ```
   #0  0x00007f655e5e8d0d in std::__atomic_base<long>::load (__m=std::memory_order_seq_cst, this=0xb8) at /usr/include/c++/5/bits/atomic_base.h:396
   #1  std::__atomic_base<long>::operator long (this=0xb8) at /usr/include/c++/5/bits/atomic_base.h:259
   #2  0x00007f655e5e6348 in boost::asio::detail::task_io_service::run (this=0x0, ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:136
   #3  0x00007f655e5e6cc4 in boost::asio::io_service::run (this=0x1f11990) at /usr/include/boost/asio/impl/io_service.ipp:59
   #4  0x00007f655e5e32d0 in pulsar::ExecutorService::startWorker (this=0x1f11130, io_service=std::shared_ptr (count 2, weak 0) 0x1e8ba00) at /pulsar/pulsar-client-cpp/lib/ExecutorService.cc:37
   #5  0x00007f655e5f1680 in std::_Mem_fn_base<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>), true>::operator()<std::shared_ptr<boost::asio::io_service>&, void> (this=0x1c45ff8, __object=0x1f11130)
       at /usr/include/c++/5/functional:600
   #6  0x00007f655e5f1574 in std::_Bind<std::_Mem_fn<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>)> (pulsar::ExecutorService*, std::shared_ptr<boost::asio::io_service>)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) (this=0x1c45ff8, __args=<unknown type in /pulsar/pulsar-client-cpp/python/_pulsar.so, CU 0x60498d, DIE 0x64b00a>) at /usr/include/c++/5/functional:1074
   #7  0x00007f655e5f1469 in std::_Bind<std::_Mem_fn<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>)> (pulsar::ExecutorService*, std::shared_ptr<boost::asio::io_service>)>::operator()<, void>() (this=0x1c45ff8)
       at /usr/include/c++/5/functional:1133
   #8  0x00007f655e5f142e in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>)> (pulsar::ExecutorService*, std::shared_ptr<boost::asio::io_service>)> ()>::_M_invoke<>(std::_Index_tuple<>)
       (this=0x1c45ff8) at /usr/include/c++/5/functional:1531
   #9  0x00007f655e5f132e in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>)> (pulsar::ExecutorService*, std::shared_ptr<boost::asio::io_service>)> ()>::operator()() (this=0x1c45ff8)
       at /usr/include/c++/5/functional:1520
   #10 0x00007f655e5f1194 in std::thread::_Impl<std::_Bind_simple<std::_Bind<std::_Mem_fn<void (pulsar::ExecutorService::*)(std::shared_ptr<boost::asio::io_service>)> (pulsar::ExecutorService*, std::shared_ptr<boost::asio::io_service>)> ()> >::_M_run() (
       this=0x1c45fe0) at /usr/include/c++/5/thread:115
   #11 0x00007f655e866bd0 in execute_native_thread_routine () from /pulsar/pulsar-client-cpp/python/_pulsar.so
   #12 0x00007f655fbab6ba in start_thread (arg=0x7f65558f4700) at pthread_create.c:333
   #13 0x00007f655f8e151d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
   ```
   
   It should be noted about the frame `#2`:
   
   ```
   #2  0x00007f655e5e6348 in boost::asio::detail::task_io_service::run (this=0x0, ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:136
   ```
   
   We can see the pointer is null from `this=0x0`. While from `#3` we can see the `io_service` object is not null. It looks like somehow the internal `impl_` field of `io_service` is released.
   
   I'll work on refactoring the `ExecutorService` implementation and see whether will happen.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org