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.
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<rocketmq::MQMessageExt, std::allocator<rocketmq::MQMessageExt> > const&) ()
from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#3 0x00007fffe827d75f in rocketmq::ConsumeMessageConcurrentlyService::ConsumeRequest(boost::weak_ptr<rocketmq::PullRequest>, std::vector<rocketmq::MQMessageExt, std::allocator<rocketmq::MQMessageExt> >&) ()
from /nix/store/cabccf1jbls4619vj7frq6mlad3p70y9-rocketmq-client-cpp-2.2.0/lib/librocketmq.so
#4 0x00007fffe8280027 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, rocketmq::ConsumeMessageConcurrentlyService, boost::weak_ptr<rocketmq::PullRequest>, std::vector<rocketmq::MQMessageExt, std::allocator<rocketmq::MQMessageExt> >&>, boost::_bi::list3<boost::_bi::value<rocketmq::ConsumeMessageConcurrentlyService*>, boost::_bi::value<boost::shared_ptr<rocketmq::PullRequest> >, boost::_bi::value<std::vector<rocketmq::MQMessageExt, std::allocator<rocketmq::MQMessageExt> > > > > >::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)
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.Then I got a Segmentation fault, the backtrace:
(This crash happened on nixos. It is also reproducible on ubuntu 16)