apache / apache/rocketmq-client-python
Thread "ConsumeTP" Segmentation fault at ffi_closure_unix64_inner
- Ngôn ngữ chính
- Python
- Star
- 305
- Fork
- 98
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm using rocketmq-client-python in a django project and have a Segmentation fault issue.
Here's my `apps.py`,where a ready() function is defined to start a consumer.
```python
from django.apps import AppConfig
class AppConfig(AppConfig):
name = 'app'
verbose_name = 'app'
default_auto_field = 'django.db.models.BigAutoField'
def ready(self):
from rocketmq.client import PushConsumer, ConsumeStatus
def consumer_callback(msg):
print(555)
return ConsumeStatus.CONSUME_SUCCESS
consumer = PushConsumer('ocp5-consumer')
consumer.set_name_server_address('10.0.0.1:9876')
consumer.subscribe('OCP', consumer_callback)
consumer.start()
```
Then I got a Segmentation fault, the backtrace:
```
Thread 79 "ConsumeTP" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffeb17fa640 (LWP 62181)]
0x00007fffe8386460 in ffi_closure_unix64_inner () from /nix/store/m0fsvgc5hrn3yjwsl9fvj5m6pyjk2il2-libffi-3.4.4/lib/libffi.so.8
(gdb) bt
#0 0x00007fffe8386460 in ffi_closure_unix64_inner () from /nix/store/m0fsvgc5hrn3yjwsl9fvj5m6pyjk2il2-libffi-3.4.4/lib/libffi.so.8
#1 0x00007fffe83869e0 in ffi_closure_unix64 () from /nix/store/m0fsvgc5hrn3yjwsl9fvj5m6pyjk2il2-libffi-3.4.4/lib/libffi.so.8
#2 0x00007fffe82b58db in MessageListenerInner::consumeMessage(std::vector > const&) ()
from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#3 0x00007fffe827d75f in rocketmq::ConsumeMessageConcurrentlyService::ConsumeRequest(boost::weak_ptr, std::vector >&) ()
from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#4 0x00007fffe8280027 in boost::asio::detail::completion_handler, std::vector >&>, boost::_bi::list3, boost::_bi::value >, boost::_bi::value > > > > >::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) () from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#5 0x00007fffe827ec19 in boost::asio::detail::scheduler::run(boost::system::error_code&) () from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#6 0x00007fffe827ee3b in boost::asio::io_context::run() () from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#7 0x00007fffe802f882 in thread_proxy () from /nix/store/vkqkncgi656rs5ad9mvdnpg2fvkn3alf-boost-1.69.0/lib/libboost_thread.so.1.69.0
#8 0x00007ffff78f1e86 in start_thread () from /nix/store/76l4v99sk83ylfwkz8wmwrm4s8h73rhd-glibc-2.35-224/lib/libc.so.6
#9 0x00007ffff7977ee4 in clone () from /nix/store/76l4v99sk83ylfwkz8wmwrm4s8h73rhd-glibc-2.35-224/lib/libc.so.6
```
(This crash happened on nixos. It is also reproducible on ubuntu 16)
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with the apps.py ready() method and the rocketmq.client PushConsumer callback, then inspect the native librocketmq and ffi_closure frames in the supplied backtrace. Reproduce the crash on the reported platforms and identify a way for consumer startup and message consumption to complete without a segmentation fault.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, django, python
- Lĩnh vực
- backend, distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100