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 2020/07/17 09:18:16 UTC
[GitHub] [pulsar] lbenc135 opened a new issue #7577: std:bad_function_call kills program with SIGABRT
lbenc135 opened a new issue #7577:
URL: https://github.com/apache/pulsar/issues/7577
**Describe the bug**
On `python-client==2.6.0` calling `subscribe` when Pulsar server is *not* running kills the program instead of raising an Exception.
**To Reproduce**
Run with pulsar server not running:
```
import pulsar
client = pulsar.Client(service_url='pulsar://localhost:6650')
try:
client.subscribe(
topic=['test-1', 'test-2'],
subscription_name='test'
)
except Exception:
print("Not called!")
```
You should get:
```
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
```
**Expected behavior**
Client to throw an exception (ideally something like `PulsarException`).
**Desktop (please complete the following information):**
- OS: Ubuntu 20.04
**Additional context**
pip freeze:
```
apache-bookkeeper-client==4.11.0
certifi==2020.6.20
chardet==3.0.4
fastavro==0.23.6
grpcio==1.30.0
idna==2.10
pkg-resources==0.0.0
prometheus-client==0.8.0
protobuf==3.12.2
pulsar-client==2.6.0
pymmh3==0.0.5
pytz==2020.1
ratelimit==2.2.1
requests==2.24.0
six==1.15.0
urllib3==1.25.9
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat commented on issue #7577: ConnectError throws std:bad_function_call and kills program with SIGABRT
Posted by GitBox <gi...@apache.org>.
merlimat commented on issue #7577:
URL: https://github.com/apache/pulsar/issues/7577#issuecomment-660387606
Apparently it only happens when consuming from multiple topics. I have a fix underway.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat closed issue #7577: ConnectError throws std:bad_function_call and kills program with SIGABRT
Posted by GitBox <gi...@apache.org>.
merlimat closed issue #7577:
URL: https://github.com/apache/pulsar/issues/7577
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat commented on issue #7577: ConnectError throws std:bad_function_call and kills program with SIGABRT
Posted by GitBox <gi...@apache.org>.
merlimat commented on issue #7577:
URL: https://github.com/apache/pulsar/issues/7577#issuecomment-660386813
@lbenc135 It's indeed very easily reproducible. Got this stack trace:
```
Thread 2 Crashed:
0 libsystem_kernel.dylib 0x00007fff695be33a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6967ae60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff69545808 abort + 120
3 libc++abi.dylib 0x00007fff667a5458 abort_message + 231
4 libc++abi.dylib 0x00007fff667968a7 demangling_terminate_handler() + 238
5 libobjc.A.dylib 0x00007fff682d15b1 _objc_terminate() + 104
6 libc++abi.dylib 0x00007fff667a4887 std::__terminate(void (*)()) + 8
7 libc++abi.dylib 0x00007fff667a71a2 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
8 libc++abi.dylib 0x00007fff667a7169 __cxa_throw + 113
9 _pulsar.cpython-38-darwin.so 0x00000001036b6f62 std::__1::__throw_bad_function_call() + 50
10 _pulsar.cpython-38-darwin.so 0x00000001036b21b6 pulsar::MultiTopicsConsumerImpl::closeAsync(std::__1::function<void (pulsar::Result)>) + 2166
11 _pulsar.cpython-38-darwin.so 0x00000001036abefc pulsar::MultiTopicsConsumerImpl::handleOneTopicSubscribed(pulsar::Result, pulsar::Consumer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<std::__1::atomic<int> >) + 2092
12 _pulsar.cpython-38-darwin.so 0x00000001036b740f void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (pulsar::MultiTopicsConsumerImpl::*)(pulsar::Result, pulsar::Consumer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<std::__1::atomic<int> >), std::__1::shared_ptr<pulsar::MultiTopicsConsumerImpl>, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<std::__1::atomic<int> >&>&, pulsar::Result, pulsar::Consumer const&>(std::__1::__bind<void (pulsar::MultiTopicsConsumerImpl::*)(pulsar::Result, pulsar::Consumer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<std::__1::atomic<int> >), std::__1::shared_ptr<pulsar::MultiTopicsConsumerImpl>, std::__1::placeholders::__ph<1> const&, s
td::__1::placeholders::__ph<2> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<std::__1::atomic<int> >&>&, pulsar::Result&&, pulsar::Consumer const&) + 127
13 _pulsar.cpython-38-darwin.so 0x00000001035f108c pulsar::Promise<pulsar::Result, pulsar::Consumer>::setFailed(pulsar::Result) + 124
14 _pulsar.cpython-38-darwin.so 0x00000001036ac705 pulsar::MultiTopicsConsumerImpl::subscribeTopicPartitions(pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult>, std::__1::shared_ptr<pulsar::TopicName>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::ConsumerConfiguration, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, pulsar::Consumer> >) + 837
15 _pulsar.cpython-38-darwin.so 0x00000001036b7af9 void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (pulsar::MultiTopicsConsumerImpl::*)(pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult>, std::__1::shared_ptr<pulsar::TopicName>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::ConsumerConfiguration, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, pulsar::Consumer> >), std::__1::shared_ptr<pulsar::MultiTopicsConsumerImpl>, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::shared_ptr<pulsar::TopicName>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::ConsumerConfiguration const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, pulsar::Consumer> >&>&, pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> const&>(std::__1::__bind<void (pulsar::MultiTopicsConsumerImpl::*)(pul
sar::Result, std::__1::shared_ptr<pulsar::LookupDataResult>, std::__1::shared_ptr<pulsar::TopicName>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::ConsumerConfiguration, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, pulsar::Consumer> >), std::__1::shared_ptr<pulsar::MultiTopicsConsumerImpl>, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::shared_ptr<pulsar::TopicName>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::ConsumerConfiguration const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, pulsar::Consumer> >&>&, pulsar::Result&&, std::__1::shared_ptr<pulsar::LookupDataResult> const&) + 169
16 _pulsar.cpython-38-darwin.so 0x00000001035e775c pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> >::setFailed(pulsar::Result) + 124
17 _pulsar.cpython-38-darwin.so 0x00000001035e842a pulsar::BinaryProtoLookupService::sendPartitionMetadataLookupRequest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::Result, std::__1::weak_ptr<pulsar::ClientConnection> const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> > >) + 58
18 _pulsar.cpython-38-darwin.so 0x00000001035eb73f void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (pulsar::BinaryProtoLookupService::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::Result, std::__1::weak_ptr<pulsar::ClientConnection> const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> > >), pulsar::BinaryProtoLookupService*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> > >&>&, pulsar::Result, std::__1::weak_ptr<pulsar::ClientConnection> const&>(std::__1::__bind<void (pulsar::BinaryProtoLookupService::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, pulsar::Result, std:
:__1::weak_ptr<pulsar::ClientConnection> const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> > >), pulsar::BinaryProtoLookupService*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::shared_ptr<pulsar::Promise<pulsar::Result, std::__1::shared_ptr<pulsar::LookupDataResult> > >&>&, pulsar::Result&&, std::__1::weak_ptr<pulsar::ClientConnection> const&) + 79
19 _pulsar.cpython-38-darwin.so 0x0000000103609b7c pulsar::Promise<pulsar::Result, std::__1::weak_ptr<pulsar::ClientConnection> >::setFailed(pulsar::Result) + 124
20 _pulsar.cpython-38-darwin.so 0x00000001035f5b16 pulsar::ClientConnection::close() + 1622
21 _pulsar.cpython-38-darwin.so 0x00000001035f9660 pulsar::ClientConnection::handleTcpConnected(boost::system::error_code const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>) + 2384
22 _pulsar.cpython-38-darwin.so 0x0000000103617d00 boost::asio::detail::binder1<std::__1::__bind<void (pulsar::ClientConnection::*)(boost::system::error_code const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>), std::__1::shared_ptr<pulsar::ClientConnection>, std::__1::placeholders::__ph<1> const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>&>, boost::system::error_code>::operator()() + 80
23 _pulsar.cpython-38-darwin.so 0x0000000103618263 boost::asio::detail::reactive_socket_connect_op<std::__1::__bind<void (pulsar::ClientConnection::*)(boost::system::error_code const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>), std::__1::shared_ptr<pulsar::ClientConnection>, std::__1::placeholders::__ph<1> const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>&>, boost::asio::detail::io_object_executor<boost::asio::executor> >::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) + 211
24 _pulsar.cpython-38-darwin.so 0x0000000103620b05 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) + 725
25 _pulsar.cpython-38-darwin.so 0x0000000103620571 boost::asio::detail::scheduler::run(boost::system::error_code&) + 273
26 _pulsar.cpython-38-darwin.so 0x000000010368165e pulsar::ExecutorService::startWorker(std::__1::shared_ptr<boost::asio::io_context>) + 62
27 _pulsar.cpython-38-darwin.so 0x000000010368426f void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (pulsar::ExecutorService::*)(std::__1::shared_ptr<boost::asio::io_context>), pulsar::ExecutorService*, std::__1::shared_ptr<boost::asio::io_context>&> > >(void*) + 95
28 libsystem_pthread.dylib 0x00007fff6967b109 _pthread_start + 148
29 libsystem_pthread.dylib 0x00007fff69676b8b thread_start + 15
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org